Merge lp:~stefanor/ibid/math-336175 into lp:~ibid-core/ibid/old-trunk-pack-0.92

Proposed by Stefano Rivera
Status: Merged
Approved by: Michael Gorven
Approved revision: 553
Merged at revision: 555
Proposed branch: lp:~stefanor/ibid/math-336175
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/math-336175
Reviewer Review Type Date Requested Status
Michael Gorven Approve
Jonathan Hitchcock Approve
Review via email: mp+4043@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefano Rivera (stefanor) wrote :

Pretty simple stuff

lp:~stefanor/ibid/math-336175 updated
553. By Stefano Rivera

We missed out on domain errors

Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve
Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve
 status approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/math.py'
2--- ibid/plugins/math.py 2009-02-26 10:05:53 +0000
3+++ ibid/plugins/math.py 2009-03-01 09:47:48 +0000
4@@ -47,6 +47,12 @@
5
6 try:
7 result = eval(expression, {'__builtins__': None}, self.safe)
8+ except ZeroDivisionError, e:
9+ event.addresponse(u"I can't divide by zero.")
10+ return
11+ except ArithmeticError, e:
12+ event.addresponse(u"I can't do that: %s" % e.message)
13+ return
14 except Exception, e:
15 return
16

Subscribers

People subscribed via source and target branches