forked from openlp/openlp
Cleanup BaseModel key iteration
This commit is contained in:
parent
bbcfd7729c
commit
c109b26d22
@ -34,8 +34,7 @@ class BaseModel(object):
|
|||||||
Creates an instance of a class and populates it, returning the instance
|
Creates an instance of a class and populates it, returning the instance
|
||||||
"""
|
"""
|
||||||
me = cls()
|
me = cls()
|
||||||
keys = kwargs.keys()
|
for key in kwargs:
|
||||||
for key in keys:
|
|
||||||
me.__setattr__(key, kwargs[key])
|
me.__setattr__(key, kwargs[key])
|
||||||
return me
|
return me
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user