diff --git a/src/ircdb.py b/src/ircdb.py index 15f8a4c02..719980f94 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -287,8 +287,9 @@ class IrcUser(object): def unsetAuth(self): """Unsets a use's authenticated hostmask.""" - users.invalidateCache(hostmask=self.auth[1]) - self.auth = None + if self.auth is not None: + users.invalidateCache(hostmask=self.auth[1]) + self.auth = None def preserve(self, fd, indent=''): def write(s):