Commit 5867e670 authored by Federico Sismondi's avatar Federico Sismondi

allow Msg creation with from_dict and from_json, even when they are responses

parent 68454550
......@@ -80,7 +80,7 @@ import time
import json
import uuid
API_VERSION = '1.0.1'
API_VERSION = '1.0.2'
# TODO use metaclasses instead?
......@@ -192,11 +192,6 @@ class Message(object):
else:
raise NonCompliantMessageFormatError("Not a Json")
# check fist if it's a response
if "ok" in message_dict:
# cannot build a complete reply message just from the json representation
return
return cls.from_dict(message_dict)
@classmethod
......@@ -208,11 +203,6 @@ class Message(object):
"""
assert type(message_dict) is dict
# check fist if it's a response
if "ok" in message_dict:
# cannot build a complete reply message just from the json representation
return
message_type = message_dict["_type"]
if message_type in message_types_dict:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment