Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def requestAvatarId(self, credentials):
u, p = credentials.username, credentials.password
u = u.lower()
try:
if self.players[u][0] == p:
return u
raise epottery.BadPassword()
except KeyError:
raise epottery.NoSuchUser()
def requestAvatarId(self, credentials):
u, p = credentials.username, credentials.password
u = u.lower()
try:
if self.players[u][0] == p:
return u
raise epottery.BadPassword()
except KeyError:
raise epottery.NoSuchUser()
def ebAmbiguity(err):
err.trap(epottery.AmbiguousArgument)
exc = err.value
if len(exc.objects) == 0:
transport.write(getattr(err.value.action, err.value.part + "NotAvailable", "Who's that?") + "\r\n")
else:
transport.write("Could you be more specific?\r\n")
def ebParse(err):
err.trap(epottery.NoSuchCommand)
# transport.write('Bad command or filename\r\n> ')
transport.write('Bad command or filename\r\n')