From 5ee8c9c9307557e5546df379eb6b5c9b1faf9e4b Mon Sep 17 00:00:00 2001 From: Tim Nyborg Date: Mon, 27 Jul 2015 12:07:26 +0100 Subject: [PATCH] simplejsonrpc: Fix TypeError when data is none --- gluon/contrib/simplejsonrpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/contrib/simplejsonrpc.py b/gluon/contrib/simplejsonrpc.py index 6a68da0a..d9c70a76 100644 --- a/gluon/contrib/simplejsonrpc.py +++ b/gluon/contrib/simplejsonrpc.py @@ -34,7 +34,7 @@ except ImportError: class JSONRPCError(RuntimeError): "Error object for remote procedure call fail" def __init__(self, code, message, data=None): - value = "%s: %s\n%s" % (code, message, '\n'.join(data)) + value = "%s: %s\n%s" % (code, message, '\n'.join(data or '')) RuntimeError.__init__(self, value) self.code = code self.message = message