mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Fixed testing, w00t!
This commit is contained in:
parent
cb3f763bf0
commit
3bd50b1d6a
10
src/ircdb.py
10
src/ircdb.py
@ -516,7 +516,10 @@ class UsersDictionary(utils.IterableMap):
|
||||
if self.filename is not None:
|
||||
self.nextId = 0
|
||||
self.users.clear()
|
||||
try:
|
||||
self.open(self.filename)
|
||||
except EnvironmentError, e:
|
||||
log.warning('UsersDictionary.reload failed: %s', e)
|
||||
else:
|
||||
log.warning('UsersDictionary.reload called without self.filename.')
|
||||
|
||||
@ -660,15 +663,18 @@ class ChannelsDictionary(utils.IterableMap):
|
||||
c.preserve(fd, indent=' ')
|
||||
fd.close()
|
||||
else:
|
||||
log.warning('ChannelsDictionary.flush called with self.filename.')
|
||||
log.warning('ChannelsDictionary.flush without self.filename.')
|
||||
|
||||
def reload(self):
|
||||
"""Reloads the channel database from its file."""
|
||||
if self.filename:
|
||||
self.channels.clear()
|
||||
try:
|
||||
self.open(self.filename)
|
||||
except EnvironmentError, e:
|
||||
log.warning('ChannelsDictionary.reload failed: %s', e)
|
||||
else:
|
||||
log.warning('ChannelsDictionary.reload called with self.filename.')
|
||||
log.warning('ChannelsDictionary.reload without self.filename.')
|
||||
|
||||
def getChannel(self, channel):
|
||||
"""Returns an IrcChannel object for the given channel."""
|
||||
|
Loading…
Reference in New Issue
Block a user