Skip to content

Commit

Permalink
Remove some legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek committed Jul 19, 2015
1 parent e28164b commit 640578b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions schemamessages/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,6 @@ def __init__(self, schema):
Constructor for message factory, takes schema (dict) as the first
argument and generates message classes based on the schema.
"""
def new_class_init(self, *args, **kwargs):
if(args):
self.hydrate(args[0])

keys = list(schema.keys())
keys.sort()
next_id = 1
Expand All @@ -300,9 +296,7 @@ def new_class_init(self, *args, **kwargs):
number of {} message types.'''.format(sys.maxsize))

for msg_class_name in keys:
newclass = type(msg_class_name, (MessageBase,), {
'__init__': new_class_init
})
newclass = type(msg_class_name, (MessageBase,), {})

if('enums' in schema[msg_class_name]):
for key in schema[msg_class_name]['enums'].keys():
Expand Down

0 comments on commit 640578b

Please sign in to comment.