diff --git a/evennia/scripts/migrations/0004_auto_20150306_1354.py b/evennia/scripts/migrations/0004_auto_20150306_1354.py index 5a7f6a13c6..d9b420857d 100644 --- a/evennia/scripts/migrations/0004_auto_20150306_1354.py +++ b/evennia/scripts/migrations/0004_auto_20150306_1354.py @@ -19,4 +19,5 @@ class Migration(migrations.Migration): ] operations = [ + migrations.RunPython(remove_manage_scripts), ] diff --git a/evennia/scripts/scripts.py b/evennia/scripts/scripts.py index ca83c63275..582b8fe016 100644 --- a/evennia/scripts/scripts.py +++ b/evennia/scripts/scripts.py @@ -15,8 +15,8 @@ from evennia.scripts.manager import ScriptManager from evennia.comms import channelhandler from evennia.utils import logger -__all__ = ["DefaultScript", "DoNothing", "CheckSessions", - "ValidateScripts", "ValidateChannelHandler"] +__all__ = ["DefaultScript", "DoNothing", "Store"] + _GA = object.__getattribute__ _SESSIONS = None diff --git a/evennia/typeclasses/models.py b/evennia/typeclasses/models.py index eb94c9e4f1..4c2172afbd 100644 --- a/evennia/typeclasses/models.py +++ b/evennia/typeclasses/models.py @@ -41,8 +41,9 @@ from evennia.utils.idmapper.models import SharedMemoryModel, SharedMemoryModelBa from evennia.typeclasses import managers from evennia.locks.lockhandler import LockHandler from evennia.utils.utils import ( - is_iter, inherits_from, lazy_property, - class_from_module) + is_iter, inherits_from, lazy_property, + class_from_module) +from evennia.utils.logger import log_trace from evennia.typeclasses.django_new_patch import patched_new __all__ = ("TypedObject", ) @@ -180,10 +181,17 @@ class TypedObject(SharedMemoryModel): typeclass_path = kwargs.pop("typeclass", None) super(TypedObject, self).__init__(*args, **kwargs) if typeclass_path: - self.__class__ = class_from_module(typeclass_path) - self.db_typclass_path = typeclass_path + try: + self.__class__ = class_from_module(typeclass_path) + except ImportError: + log_trace() + finally: + self.db_typclass_path = typeclass_path elif self.db_typeclass_path: - self.__class__ = class_from_module(self.db_typeclass_path) + try: + self.__class__ = class_from_module(self.db_typeclass_path) + except ImportError: + log_trace() else: self.db_typeclass_path = "%s.%s" % (self.__module__, self.__class__.__name__) # important to put this at the end since _meta is based on the set __class__