Added an error_check_python_modules function to evennia.py. This basically imports a host of critical modules and quits with tracebacks if there are problems. This catches pure python-syntax errors (i.e. cases where the source-file itself is malformed), something which is hard to properly handle in the running server (where there's also an issue as to how to best report it). Best they fail out already at an early stage.

This commit is contained in:
Griatch 2011-11-06 21:32:00 +01:00
parent e379816866
commit 703accdd60
7 changed files with 59 additions and 9 deletions

View file

@ -68,6 +68,13 @@ class ObjectManager(TypedObjectManager):
# use the id to find the player
return self.get_object_with_user(dbref)
@returns_typeclass_list
def get_objs_with_key_and_typeclass(oname, otypeclass_path):
"""
Returns objects based on simultaneous key and typeclass match.
"""
return self.filter(db_key__iexact=oname).filter(db_typeclass_path_exact=otypeclass_path)
# attr/property related
@returns_typeclass_list