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:
Michele Comitini
2013-01-25 21:41:14 +01:00
parent 9a957c907a
commit 2eeb1e74b2
2 changed files with 3 additions and 5 deletions
@@ -157,8 +157,6 @@ server for requests. It can be used for the optional"scope" parameters for Face
grant_type='authorization_code'
)
if False and self.args:
data.update(self.args)
open_url = None
opener = self.__build_url_opener(self.token_url)
try:
+3 -3
View File
@@ -4434,12 +4434,12 @@ class Service(object):
return return_error(id, e.code, e.info)
except BaseException:
etype, eval, etb = sys.exc_info()
code = -32001
data = '%s: %s\n' % (etype.__name__, eval) + request.is_local and traceback.format_tb(etb)
code = -32099
data = '%s: %s\n' % (etype.__name__, eval) + str(request.is_local and traceback.format_tb(etb))
return return_error(id, code, data=data)
except:
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):