From 50cb2887b2914214e6210bce49ffa962190c71d7 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 31 Mar 2003 02:53:07 +0000 Subject: [PATCH] Modified how entries are added to self.revcache --- src/ircdb.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ircdb.py b/src/ircdb.py index d5462038c..76ed3e4e2 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -297,10 +297,7 @@ class UsersDictionary(object): for (name, user) in self.dict.iteritems(): if user.checkHostmask(s): self.cache[s] = name - if name in self.revcache: - self.revcache[name].append(s) - else: - self.revcache[name] = [s] + self.revcache.setdefault(name,[]).append(s) return name raise KeyError, s