mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-04 17:09:24 +01:00
Aka: Fix import of locked alias.
This commit is contained in:
parent
18cc1ff3bb
commit
73f63c25b9
@ -476,7 +476,7 @@ class Aka(callbacks.Plugin):
|
|||||||
except AkaError as e:
|
except AkaError as e:
|
||||||
errors[name] = e.args[0]
|
errors[name] = e.args[0]
|
||||||
else:
|
else:
|
||||||
alias_plugin.removeAlias(name)
|
alias_plugin.removeAlias(name, evenIfLocked=True)
|
||||||
if errors:
|
if errors:
|
||||||
irc.error(format(_('Error occured when importing the %n: %L'),
|
irc.error(format(_('Error occured when importing the %n: %L'),
|
||||||
(len(errors), 'following', 'command'),
|
(len(errors), 'following', 'command'),
|
||||||
|
@ -197,6 +197,7 @@ class AkaTestCase(PluginTestCase):
|
|||||||
|
|
||||||
self.assertNotError('alias add foo "echo test"')
|
self.assertNotError('alias add foo "echo test"')
|
||||||
self.assertNotError('alias add spam "echo egg"')
|
self.assertNotError('alias add spam "echo egg"')
|
||||||
|
self.assertNotError('alias lock spam')
|
||||||
|
|
||||||
self.assertRegexp('aka importaliasdatabase',
|
self.assertRegexp('aka importaliasdatabase',
|
||||||
r'the 1 following command: foo \(This Aka already exists.\)$')
|
r'the 1 following command: foo \(This Aka already exists.\)$')
|
||||||
|
Loading…
Reference in New Issue
Block a user