Updated False if failed login.
This commit is contained in:
parent
b6185a95f3
commit
203314b209
@ -5,6 +5,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Snek</title>
|
<title>Snek</title>
|
||||||
<style>{{highlight_styles}}</style>
|
<style>{{highlight_styles}}</style>
|
||||||
|
<script src="/push.js"></script>
|
||||||
<script src="/upload-button.js"></script>
|
<script src="/upload-button.js"></script>
|
||||||
<script src="/html-frame.js"></script>
|
<script src="/html-frame.js"></script>
|
||||||
<script src="/schedule.js"></script>
|
<script src="/schedule.js"></script>
|
||||||
|
@ -127,13 +127,15 @@ class RPCView(BaseView):
|
|||||||
method = getattr(self,method_name.replace(".","_"),None)
|
method = getattr(self,method_name.replace(".","_"),None)
|
||||||
if not method:
|
if not method:
|
||||||
raise Exception("Method not found")
|
raise Exception("Method not found")
|
||||||
|
success = True
|
||||||
try:
|
try:
|
||||||
result = await method(*args)
|
result = await method(*args)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
result = dict({"exception":str(ex),"traceback":traceback.format_exc()})
|
result = dict({"exception":str(ex),"traceback":traceback.format_exc()})
|
||||||
|
success = False
|
||||||
print(result,flush=True)
|
print(result,flush=True)
|
||||||
#dict(error=ex=str(ex),traceback=traceback.format_exc())
|
#dict(error=ex=str(ex),traceback=traceback.format_exc())
|
||||||
await self._send_json({"callId":call_id,"success":True,"data":result})
|
await self._send_json({"callId":call_id,"success":success,"data":result})
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
await self._send_json({"callId":call_id,"success":False,"data":str(ex)})
|
await self._send_json({"callId":call_id,"success":False,"data":str(ex)})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user