Merge lp:~pconnell/endroid/bugfix into lp:endroid
Status: | Merged |
---|---|
Approved by: | Phil Connell |
Approved revision: | 79 |
Merged at revision: | 79 |
Proposed branch: | lp:~pconnell/endroid/bugfix |
Merge into: | lp:endroid |
Diff against target: |
14 lines (+2/-2) 1 file modified
src/endroid/plugins/command.py (+2/-2) |
To merge this branch: | bzr merge lp:~pconnell/endroid/bugfix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Patrick Stevens | Approve | ||
Review via email: mp+231545@code.launchpad.net |
Commit message
Allow command plugin dependencies to be specified in any iterable type.
Previously plugin.dependencies was forced to be a tuple. A naive change in the
SMS plugin hit this restriction:
>>> import endroid.plugins.sms
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
class SMS(CommandPlugin):
File "/usr/lib/
TypeError: Error when calling the metaclass bases
can only concatenate list (not "tuple") to list
Rather than changing the SMS plugin, it's better to make the command plugin
more lenient.
Description of the change
Recent changes to the SMS plugin exposed a bug in command plugin dependency handling: dependencies had to be specified as a tuple. SMS was using a list, meaning attempts to import it failed:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
class SMS(CommandPlugin):
File "/usr/lib/
('endroid.
TypeError: Error when calling the metaclass bases
can only concatenate list (not "tuple") to list
Update Command to allow any iterable instead. It looks like the old code attempted to do this (just passed the wrong arg to tuple()).