X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;h=76f4099e1ec4199f37fbadde4d172d5d47047ed8;hp=2bf4db3db417c767259ba0b6d2731a8a2f352b27;hb=38aff5fc519f55a8b15a7602f34167bcfea3d7f6;hpb=b64bdabe02e5d30113df5052050cfb9b62683a74 diff --git a/mudpy/misc.py b/mudpy/misc.py index 2bf4db3..76f4099 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -636,7 +636,7 @@ class User: def authenticate(self): """Flag the user as authenticated and disconnect duplicates.""" - if self.state is not "authenticated": + if self.state != "authenticated": self.authenticated = True if ("mudpy.limit" in universe.contents and self.account.subkey in universe.contents["mudpy.limit"].get("admins")): @@ -1191,7 +1191,7 @@ def weighted_choice(data): # create the expanded list of keys for key in data.keys(): - for count in range(data[key]): + for _count in range(data[key]): expanded.append(key) # return one at random @@ -1242,7 +1242,7 @@ def random_name(): name = "" # create a name of random length from the syllables - for syllable in range(random.randrange(2, 6)): + for _syllable in range(random.randrange(2, 6)): name += weighted_choice(syllables) # strip any leading quotemark, capitalize and return the name