Merge pull request #943 from tardyp/fixdeprecation

fix warning on py2 as well
This commit is contained in:
Jack Danger 2017-05-15 12:10:28 -07:00 committed by GitHub
commit af7a5859fe

View File

@ -229,10 +229,7 @@ class InstanceTrackerMeta(type):
@six.add_metaclass(InstanceTrackerMeta)
class BaseModel(object):
def __new__(cls, *args, **kwargs):
if six.PY2:
instance = super(BaseModel, cls).__new__(cls, *args, **kwargs)
else:
instance = super(BaseModel, cls).__new__(cls)
instance = super(BaseModel, cls).__new__(cls)
cls.instances.append(instance)
return instance