mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 06:27:17 +02:00
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:
parent
e379816866
commit
703accdd60
7 changed files with 59 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue