only delete the attribute if it exists
This commit is contained in:
committed by
Gregory Becker
parent
2ad94bc76a
commit
2b5be8c52a
@@ -1378,7 +1378,7 @@ def get_pkg_class(self, pkg_name):
|
||||
setattr(cls, key, val)
|
||||
if new_overidden_attrs:
|
||||
setattr(cls, "overidden_attrs", dict(new_overidden_attrs))
|
||||
else:
|
||||
elif hasattr(cls, "overidden_attrs"):
|
||||
delattr(cls, "overidden_attrs")
|
||||
|
||||
return cls
|
||||
|
||||
Reference in New Issue
Block a user