Trap some more odd errors to assist in my tracking down their origin.

This commit is contained in:
Greg Taylor 2009-03-26 14:03:41 +00:00
parent 51edc17d59
commit 71a76cd1fb
3 changed files with 19 additions and 3 deletions

View file

@ -160,7 +160,14 @@ def match_exits(command):
"""
# If we're not logged in, don't check exits.
source_object = command.source_object
exits = source_object.get_location().get_contents(filter_type=defines_global.OTYPE_EXIT)
location = source_object.get_location()
if location == None:
logger.log_errmsg("cmdhandler.match_exits(): Object '%s' no location." %
source_object)
return
exits = location.get_contents(filter_type=defines_global.OTYPE_EXIT)
Object = ContentType.objects.get(app_label="objects",
model="object").model_class()
exit_matches = Object.objects.list_search_object_namestr(exits,