upd
This commit is contained in:
parent
dedb5eeede
commit
24c2de20b3
11
rbmd.py
11
rbmd.py
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user