Merge pull request #943 from tardyp/fixdeprecation
fix warning on py2 as well
This commit is contained in:
commit
af7a5859fe
1 changed files with 1 additions and 4 deletions
|
|
@ -229,10 +229,7 @@ class InstanceTrackerMeta(type):
|
||||||
@six.add_metaclass(InstanceTrackerMeta)
|
@six.add_metaclass(InstanceTrackerMeta)
|
||||||
class BaseModel(object):
|
class BaseModel(object):
|
||||||
def __new__(cls, *args, **kwargs):
|
def __new__(cls, *args, **kwargs):
|
||||||
if six.PY2:
|
instance = super(BaseModel, cls).__new__(cls)
|
||||||
instance = super(BaseModel, cls).__new__(cls, *args, **kwargs)
|
|
||||||
else:
|
|
||||||
instance = super(BaseModel, cls).__new__(cls)
|
|
||||||
cls.instances.append(instance)
|
cls.instances.append(instance)
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue