mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 12:37:16 +02:00
Fixed silly error reporting when trying to create an object of a non-found typeclass.
This commit is contained in:
parent
f25d512c30
commit
fdf5c723d2
1 changed files with 5 additions and 1 deletions
|
|
@ -150,7 +150,11 @@ def create_object(typeclass=None, key=None, location=None,
|
|||
if not _GA(new_object, "is_typeclass")(typeclass, exact=True):
|
||||
# this will fail if we gave a typeclass as input and it still
|
||||
# gave us a default
|
||||
SharedMemoryModel.delete(new_db_object)
|
||||
try:
|
||||
SharedMemoryModel.delete(new_db_object)
|
||||
except AssertionError:
|
||||
# this happens if object was never created
|
||||
pass
|
||||
if report_to:
|
||||
report_to = handle_dbref(report_to, _ObjectDB)
|
||||
_GA(report_to, "msg")("Error creating %s (%s).\n%s" % (new_db_object.key, typeclass,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue