diff --git a/evennia/commands/default/unloggedin.py b/evennia/commands/default/unloggedin.py index a82f74293c..b88b1608d6 100644 --- a/evennia/commands/default/unloggedin.py +++ b/evennia/commands/default/unloggedin.py @@ -261,7 +261,7 @@ class CmdUnconnectedCreate(MuxCommand): session.msg("Sorry, there is already a player with the name '%s'." % playername) return # Reserve playernames found in GUEST_LIST - if settings.GUEST_LIST and playername.lower() in map(str.lower, settings.GUEST_LIST): + if settings.GUEST_LIST and playername.lower() in (guest.lower() for guest in settings.GUEST_LIST): string = "\n\r That name is reserved. Please choose another Playername." session.msg(string) return diff --git a/evennia/utils/ansi.py b/evennia/utils/ansi.py index 0f7e93e2a4..e7b45e988b 100644 --- a/evennia/utils/ansi.py +++ b/evennia/utils/ansi.py @@ -595,7 +595,7 @@ class ANSIString(with_metaclass(ANSIMeta, unicode)): char_indexes = kwargs.pop('char_indexes', None) clean_string = kwargs.pop('clean_string', None) # All True, or All False, not just one. - checks = map(lambda x: x is None, [code_indexes, char_indexes, clean_string]) + checks = [x is None for x in [code_indexes, char_indexes, clean_string]] if not len(set(checks)) == 1: raise ValueError("You must specify code_indexes, char_indexes, " "and clean_string together, or not at all.")