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):
|
if not _GA(new_object, "is_typeclass")(typeclass, exact=True):
|
||||||
# this will fail if we gave a typeclass as input and it still
|
# this will fail if we gave a typeclass as input and it still
|
||||||
# gave us a default
|
# 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:
|
if report_to:
|
||||||
report_to = handle_dbref(report_to, _ObjectDB)
|
report_to = handle_dbref(report_to, _ObjectDB)
|
||||||
_GA(report_to, "msg")("Error creating %s (%s).\n%s" % (new_db_object.key, typeclass,
|
_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