gluon/tools.py: correct error codes for Jsonrpc-2.0 exceptions.
gluon/contrib/login_methods/oauth20_account.py: removed dead code.
This commit is contained in:
@@ -157,8 +157,6 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
grant_type='authorization_code'
|
grant_type='authorization_code'
|
||||||
)
|
)
|
||||||
|
|
||||||
if False and self.args:
|
|
||||||
data.update(self.args)
|
|
||||||
open_url = None
|
open_url = None
|
||||||
opener = self.__build_url_opener(self.token_url)
|
opener = self.__build_url_opener(self.token_url)
|
||||||
try:
|
try:
|
||||||
|
|||||||
+3
-3
@@ -4434,12 +4434,12 @@ class Service(object):
|
|||||||
return return_error(id, e.code, e.info)
|
return return_error(id, e.code, e.info)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
etype, eval, etb = sys.exc_info()
|
etype, eval, etb = sys.exc_info()
|
||||||
code = -32001
|
code = -32099
|
||||||
data = '%s: %s\n' % (etype.__name__, eval) + request.is_local and traceback.format_tb(etb)
|
data = '%s: %s\n' % (etype.__name__, eval) + str(request.is_local and traceback.format_tb(etb))
|
||||||
return return_error(id, code, data=data)
|
return return_error(id, code, data=data)
|
||||||
except:
|
except:
|
||||||
etype, eval, etb = sys.exc_info()
|
etype, eval, etb = sys.exc_info()
|
||||||
return return_error(id, 32099, data='Exception %s: %s' % (etype, eval))
|
return return_error(id, -32099, data='Exception %s: %s' % (etype, eval))
|
||||||
|
|
||||||
|
|
||||||
def serve_xmlrpc(self):
|
def serve_xmlrpc(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user