ProtocolErrors raise a (code, message) tuple instead of a string as per request in...
authorcatchjosh <catchjosh@ae587032-bbab-11de-869a-473eb4776397>
Tue, 15 Jun 2010 04:37:48 +0000 (04:37 +0000)
committercatchjosh <catchjosh@ae587032-bbab-11de-869a-473eb4776397>
Tue, 15 Jun 2010 04:37:48 +0000 (04:37 +0000)
git-svn-id: http://jsonrpclib.googlecode.com/svn/trunk@17 ae587032-bbab-11de-869a-473eb4776397

jsonrpclib/jsonrpclib.py

index c423ab9..01d61b9 100644 (file)
@@ -457,7 +457,7 @@ def check_for_errors(result):
     if 'error' in result.keys() and result['error'] != None:
         code = result['error']['code']
         message = result['error']['message']
-        raise ProtocolError('ERROR %s: %s' % (code, message))
+        raise ProtocolError((code, message))
     return result
 
 def isbatch(result):