Fix for NoneType exceptions when initial_setup.py is run where multisession_mode is not set to 0.
This commit is contained in:
parent
5b6376fd87
commit
8647bf2367
2 changed files with 11 additions and 5 deletions
|
|
@ -83,10 +83,12 @@ 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 None in characters:
|
|
||||||
# clean up list if character object was deleted in between
|
if characters is not None:
|
||||||
characters = [character for character in characters if character]
|
if None in characters:
|
||||||
player.db._playable_characters = characters
|
# clean up list if character object was deleted in between
|
||||||
|
characters = [character for character in characters if character]
|
||||||
|
player.db._playable_characters = characters
|
||||||
|
|
||||||
sessions = player.get_all_sessions()
|
sessions = player.get_all_sessions()
|
||||||
is_su = player.is_superuser
|
is_su = player.is_superuser
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
god_player.db._playable_characters.append(god_character)
|
|
||||||
|
try:
|
||||||
|
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue