This commit is contained in:
Anna Sudnitsina 2018-03-26 23:41:22 +03:00
parent dedb5eeede
commit 24c2de20b3

11
rbmd.py
View File

@ -108,7 +108,6 @@ class MountHandler(tornado.web.RequestHandler):
if self.get_secure_cookie("user"):
data = {k: v[0] for k, v in self.request.arguments.items()}
res = action('mount', 'post', json.dumps(data))
logging.info(res)
self.write(res)
@ -181,10 +180,12 @@ def action(name, method, data=None):
except:
res = 'connection can\'t be established'
elif method == 'post':
try:
res = requests.post(url, data).content
except:
res = 'connection can\'t be established'
res = requests.post(url, data).content
logging.info(res)
# try:
# res = requests.post(url, data).content
# except:
# res = 'connection can\'t be established'
return res