Replace filter with if/comprehension.

This commit is contained in:
Ahmed Charles 2015-10-23 04:15:06 +00:00 committed by Griatch
parent be7035416c
commit b9bdeb3e9c
3 changed files with 7 additions and 8 deletions

View file

@ -439,8 +439,8 @@ class Evennia(object):
if GUEST_ENABLED:
for guest in PlayerDB.objects.all().filter(db_typeclass_path=settings.BASE_GUEST_TYPECLASS):
for character in filter(None, guest.db._playable_characters):
character.delete()
for character in guest.db._playable_characters:
if character: character.delete()
guest.delete()
if SERVER_STARTSTOP_MODULE:
SERVER_STARTSTOP_MODULE.at_server_cold_start()