Merge lp:~slimey/endroid/hi5 into lp:endroid
Status: | Merged |
---|---|
Approved by: | Martin Morrison |
Approved revision: | 69 |
Merged at revision: | 62 |
Proposed branch: | lp:~slimey/endroid/hi5 |
Merge into: | lp:endroid |
Diff against target: |
299 lines (+254/-0) 4 files modified
bin/spelunk_hi5s (+53/-0) debian/endroid.install (+1/-0) etc/endroid.conf (+9/-0) src/endroid/plugins/hi5.py (+191/-0) |
To merge this branch: | bzr merge lp:~slimey/endroid/hi5 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Morrison | Approve | ||
Review via email: mp+184862@code.launchpad.net |
This proposal supersedes a proposal from 2013-09-08.
Commit message
Move High Five plugin over from Ensoft proprietary repo and upgrade with added awesomeness. Absolutely no overkill here.
Description of the change
Upgrade of High Five plugin:
- moving from Ensoft-proprietary to open source
- you can no longer hi5 yourself
- you can hi5 multiple people with the same compliment
- you can omit the domain part of the JID if EnDroid can unambiguously resolve this
- optional asymmetric encryption of messages as a last-resort backstop against idiots
Note that this entails a non-backwards-
Incorporates review comments.
Can anyone say "overkill"? ;-)
- The executable should have a main function, and should use argparse to parse the args so that it doesn't just splurge an exception when miscalled
- reference to spelunk script in docstring uses the .py suffix
- you've used "except Exception as e" but then not used e. It's quite a bit cheaper to not specify the variable to bind to in that case.
- your xrange-based joiner is very unpythonic. Instead, try something like:
if len(jids) > 1:
jidlist = ' & '.join([', '.join(jids[:-1])] + jids[-1:])
else:
jidlist = jids[0]
Might even be possible to eliminate the if.
- the have/has code is a prime candidate for the ternary if