Merge lp:~isoschiz/endroid/packagingchanges into lp:endroid

Proposed by Martin Morrison
Status: Merged
Approved by: ChrisD
Approved revision: 34
Merged at revision: 33
Proposed branch: lp:~isoschiz/endroid/packagingchanges
Merge into: lp:endroid
Diff against target: 70 lines (+13/-4)
5 files modified
debian/conffiles (+1/-0)
debian/endroid.install (+1/-0)
setup.py (+1/-1)
src/endroid/plugins/correct.py (+1/-1)
src/endroid/plugins/pubpicker.py (+9/-2)
To merge this branch: bzr merge lp:~isoschiz/endroid/packagingchanges
Reviewer Review Type Date Requested Status
ChrisD Approve
Review via email: mp+179910@code.launchpad.net

Commit message

Merge fixes to several bugs in the current version.

Description of the change

Merge fixes to several bugs in the current version.

To post a comment you must log in.
Revision history for this message
ChrisD (gingerchris) wrote :

well done.
gold star.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/conffiles'
2--- debian/conffiles 1970-01-01 00:00:00 +0000
3+++ debian/conffiles 2013-08-13 11:55:13 +0000
4@@ -0,0 +1,1 @@
5+var/lib/endroid/db/endroid.db
6
7=== modified file 'debian/endroid.install'
8--- debian/endroid.install 2013-08-12 13:45:18 +0000
9+++ debian/endroid.install 2013-08-13 11:55:13 +0000
10@@ -3,3 +3,4 @@
11 bin/endroid usr/bin/
12 bin/endroid_echo usr/bin/
13 lib/wokkel-0.7.1-py2.7.egg usr/lib/endroid/dependencies
14+var/endroid.db var/lib/endroid/db
15
16=== modified file 'setup.py'
17--- setup.py 2013-08-12 11:32:00 +0000
18+++ setup.py 2013-08-13 11:55:13 +0000
19@@ -9,6 +9,6 @@
20 version="1.1",
21 description='EnDroid: a modular XMPP bot',
22 url='http://open.ensoft.co.uk/EnDroid',
23- packages=['endroid', 'endroid.plugins'],
24+ packages=['endroid', 'endroid.plugins', 'endroid.plugins.compute'],
25 package_dir={'endroid': 'src/endroid'},
26 )
27
28=== modified file 'src/endroid/plugins/correct.py'
29--- src/endroid/plugins/correct.py 2013-08-06 10:32:33 +0000
30+++ src/endroid/plugins/correct.py 2013-08-13 11:55:13 +0000
31@@ -8,7 +8,7 @@
32
33 from endroid.pluginmanager import Plugin
34
35-REGEX = "^s(?P<sep>[^a-zA-Z0-9])(.+?)(?P=sep)(.*?)(?P=sep)([gi]*)(?:\s.*)?$"
36+REGEX = r"^s(?P<sep>[^a-zA-Z0-9\\])((?:[^\\]|\\.)+)(?P=sep)(?:([^\\]|\\.)*)(?P=sep)(g?i?|ig)(?:\s.*)?$"
37 REOBJ = re.compile(REGEX)
38
39 class Correct(Plugin):
40
41=== modified file 'src/endroid/plugins/pubpicker.py'
42--- src/endroid/plugins/pubpicker.py 2012-11-26 22:39:50 +0000
43+++ src/endroid/plugins/pubpicker.py 2013-08-13 11:55:13 +0000
44@@ -113,14 +113,21 @@
45 pubs = []
46 for pub, score in self.pubs.items():
47 pubs += [pub] * score
48- return random.choice(pubs)
49+ if pubs:
50+ return random.choice(pubs)
51+ else:
52+ return None
53
54 def register(self, msg, arg):
55 self.vote_up(msg, self.resolve_alias(arg))
56
57 def picker(self, msg, arg):
58 pub = self.pick_a_pub()
59- msg.reply("Today, you should definitely go to %s" % pub)
60+ if pub:
61+ msg.reply("Today, you should definitely go to %s" % pub)
62+ else:
63+ msg.reply("Unfortunately, I don't seem to know about any pubs "
64+ "that anyone wants to go to")
65
66 def alias(self, msg, arg):
67 mf = ALIAS_FOR.match(arg)
68
69=== added directory 'var'
70=== added file 'var/endroid.db'

Subscribers

People subscribed via source and target branches