Make sure that users.equals returns False if at least one argument is None

This commit is contained in:
Vgr E. Barry 2017-01-25 21:26:59 -05:00
parent b68cba12d6
commit e227e0e958

View File

@ -94,7 +94,7 @@ def lower(nick, *, casemapping=None):
return nick.lower().translate(str.maketrans(mapping))
def equals(nick1, nick2):
return lower(nick1) == lower(nick2)
return nick1 is not None and nick2 is not None and lower(nick1) == lower(nick2)
def context_types(*types):
def wrapper(cls):