Merge lp:~stefanor/ibid/microblogging-391790 into lp:~ibid-core/ibid/old-trunk-pack-0.92

Proposed by Stefano Rivera
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: 675
Merged at revision: 674
Proposed branch: lp:~stefanor/ibid/microblogging-391790
Merge into: lp:~ibid-core/ibid/old-trunk-pack-0.92
Diff against target: None lines
To merge this branch: bzr merge lp:~stefanor/ibid/microblogging-391790
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Michael Gorven Approve
Review via email: mp+7860@code.launchpad.net
To post a comment you must log in.
675. By Stefano Rivera

Only return 'No such quote' when a quote was queried by id, error instead

Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve

review: Approve
Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/lookup.py'
2--- ibid/plugins/lookup.py 2009-06-02 20:00:01 +0000
3+++ ibid/plugins/lookup.py 2009-06-24 19:46:41 +0000
4@@ -186,14 +186,7 @@
5
6 @match(r'^fml$')
7 def fml_default(self, event):
8- try:
9- event.addresponse(self.remote_get('random'))
10- except FMLException:
11- event.addresponse(choice(self.failure_messages) % event.sender)
12- except HTTPError:
13- event.addresponse(choice(self.failure_messages) % event.sender)
14- except BadStatusLine:
15- event.addresponse(choice(self.failure_messages) % event.sender)
16+ self.fml(event, 'random')
17
18 @match(r'^fml\s+categories$')
19 def list_categories(self, event):
20@@ -217,7 +210,7 @@
21
22 def setup(self):
23 self.update.im_func.pattern = re.compile(r'^(%s)\s+(\d+)$' % '|'.join(self.services.keys()), re.I)
24- self.latest.im_func.pattern = re.compile(r'^(?:latest|last)\s+(%s)\s+(?:update\s+)?(?:(?:by|from|for)\s+)?(\S+)$'
25+ self.latest.im_func.pattern = re.compile(r'^(?:latest|last)\s+(%s)\s+(?:update\s+)?(?:(?:by|from|for)\s+)?@?(\S+)$'
26 % '|'.join(self.services.keys()), re.I)
27
28 def remote_update(self, service, id):

Subscribers

People subscribed via source and target branches