Explorar el Código

Added initialization to prevent error

Taddeus Kroes hace 12 años
padre
commit
a942e6bb1a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      message.py

+ 1 - 1
message.py

@@ -41,7 +41,7 @@ class BinaryMessage(Message):
 
 
 class JSONMessage(TextMessage):
-    def __init__(self, data, **kwargs):
+    def __init__(self, data={}, **kwargs):
         self.data = {}
         self.data.update(data, **kwargs)
         super(JSONMessage, self).__init__(json.dumps(self.data))