Aka: Fix import of locked alias.

This commit is contained in:
Valentin Lorentz 2013-08-15 10:55:57 +02:00
parent 18cc1ff3bb
commit 73f63c25b9
2 changed files with 2 additions and 1 deletions

View File

@ -476,7 +476,7 @@ class Aka(callbacks.Plugin):
except AkaError as e:
errors[name] = e.args[0]
else:
alias_plugin.removeAlias(name)
alias_plugin.removeAlias(name, evenIfLocked=True)
if errors:
irc.error(format(_('Error occured when importing the %n: %L'),
(len(errors), 'following', 'command'),

View File

@ -197,6 +197,7 @@ class AkaTestCase(PluginTestCase):
self.assertNotError('alias add foo "echo test"')
self.assertNotError('alias add spam "echo egg"')
self.assertNotError('alias lock spam')
self.assertRegexp('aka importaliasdatabase',
r'the 1 following command: foo \(This Aka already exists.\)$')