Fix for NoneType exceptions when initial_setup.py is run where multisession_mode is not set to 0.

This commit is contained in:
Kate 2015-08-21 22:21:57 -06:00 committed by Griatch
parent 5b6376fd87
commit 8647bf2367
2 changed files with 11 additions and 5 deletions

View file

@ -83,6 +83,8 @@ class CmdOOCLook(MuxPlayerCommand):
sessid = self.sessid sessid = self.sessid
# get all our characters and sessions # get all our characters and sessions
characters = player.db._playable_characters characters = player.db._playable_characters
if characters is not None:
if None in characters: if None in characters:
# clean up list if character object was deleted in between # clean up list if character object was deleted in between
characters = [character for character in characters if character] characters = [character for character in characters if character]

View file

@ -105,7 +105,11 @@ def create_objects():
god_player.attributes.add("_first_login", True) god_player.attributes.add("_first_login", True)
god_player.attributes.add("_last_puppet", god_character) god_player.attributes.add("_last_puppet", god_character)
try:
god_player.db._playable_characters.append(god_character) god_player.db._playable_characters.append(god_character)
except AttributeError:
pass
room_typeclass = settings.BASE_ROOM_TYPECLASS room_typeclass = settings.BASE_ROOM_TYPECLASS
limbo_obj = create.create_object(room_typeclass, _('Limbo'), nohome=True) limbo_obj = create.create_object(room_typeclass, _('Limbo'), nohome=True)