mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Fixed bug with reload not working with non-canonicalNames.
This commit is contained in:
parent
c318d5e384
commit
c3d7efa68b
@ -439,7 +439,10 @@ class Irc(IrcCommandDispatcher):
|
|||||||
|
|
||||||
def removeCallback(self, name):
|
def removeCallback(self, name):
|
||||||
"""Removes a callback from the callback list."""
|
"""Removes a callback from the callback list."""
|
||||||
(bad, good) = partition(lambda cb: cb.name() == name, self.callbacks)
|
name = name.lower()
|
||||||
|
def nameMatches(cb):
|
||||||
|
return cb.name().lower() == name
|
||||||
|
(bad, good) = partition(nameMatches, self.callbacks)
|
||||||
self.callbacks[:] = good
|
self.callbacks[:] = good
|
||||||
return bad
|
return bad
|
||||||
|
|
||||||
|
@ -99,12 +99,15 @@ class OwnerTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
self.assertError('reload Admin')
|
self.assertError('reload Admin')
|
||||||
self.assertNotError('load Admin')
|
self.assertNotError('load Admin')
|
||||||
self.assertNotError('reload Admin')
|
self.assertNotError('reload Admin')
|
||||||
|
self.assertNotError('reload ADMIN')
|
||||||
|
|
||||||
def testUnload(self):
|
def testUnload(self):
|
||||||
self.assertError('unload Admin')
|
self.assertError('unload Admin')
|
||||||
self.assertNotError('load Admin')
|
self.assertNotError('load Admin')
|
||||||
self.assertNotError('unload Admin')
|
self.assertNotError('unload Admin')
|
||||||
self.assertError('unload Admin')
|
self.assertError('unload Admin')
|
||||||
|
self.assertNotError('load ADMIN')
|
||||||
|
self.assertNotError('unload ADMIN')
|
||||||
|
|
||||||
def testSetconf(self):
|
def testSetconf(self):
|
||||||
self.assertRegexp('setconf', 'confDir')
|
self.assertRegexp('setconf', 'confDir')
|
||||||
|
Loading…
Reference in New Issue
Block a user