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