Fixed a bug in is_typeclass and cleaned up some other things in the player/object typeclass. Resolves #722.

This commit is contained in:
Griatch 2015-03-22 10:03:31 +01:00
parent f007de3a5e
commit 78ca2819b2
3 changed files with 26 additions and 69 deletions

View file

@ -401,7 +401,7 @@ class TypedObject(SharedMemoryModel):
return selfpath in typeclass
else:
# check parent chain
return any(cls.path in typeclass for cls in self.__class__.mro())
return any(hasattr(cls, "path") and cls.path in typeclass for cls in self.__class__.mro())
def swap_typeclass(self, new_typeclass, clean_attributes=False,
run_start_hooks=True, no_default=True):