[calc] Exception handling error

Bug #370278 reported by Stefano Rivera
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Fix Released
Wishlist
Michael Gorven

Bug Description

2009-05-01 01:56:57,745 DEBUG source.titan: Received message from forrie in public: tibid c0.ke�
2009-05-01 01:56:57,745 DEBUG core.dispatcher: Received event from titan source
2009-05-01 01:56:57,761 ERROR core.dispatcher: Exception occured in Calc processor of math plugin
Traceback (most recent call last):
  File "/home/stefanor/projects/ibid/dc-source/ibid/core.py", line 22, in _process
    processor.process(event)
  File "/home/stefanor/projects/ibid/dc-source/ibid/plugins/__init__.py", line 55, in process
    method(event, *match.groups())
  File "/home/stefanor/projects/ibid/dc-source/ibid/plugins/math.py", line 159, in calculate
    if isinstance(result, (int, long, float, complex)):
UnboundLocalError: local variable 'result' referenced before assignment
2009-05-01 01:56:57,788 WARNING plugins.unicode: Found a non-unicode string: exception
2009-05-01 01:56:57,788 DEBUG core.dispatcher: {'message_raw': u'tibid c0.ke\ufffd', 'account': None, 'responses': [{'reply': u'forrie: c0.ke\ufffd is a kenyan fag', 'target': u'$p
ublic', 'source': u'titan'}], 'complain': 'exception', 'source': u'titan', 'addressed': u'tibid', 'processed': True, 'time': 1241135817.746253, 'identity': 940, 'message': u'c0.ke\
ufffd', 'type': u'message', 'public': True, 'channel': u'$public', 'sender': {'nick': u'forrie', 'connection': u'forrie', 'id': u'forrie'}}
2009-05-01 01:56:57,789 DEBUG core.dispatcher: Returning event to titan source
2009-05-01 01:56:57,789 DEBUG source.titan: Sent privmsg to None: forrie: c0.ke� is a kenyan fag

Related branches

Revision history for this message
Michael Gorven (mgorven) wrote : Re: [Bug 370278] [NEW] [calc] Exception handling error

The except block for ValueError only causes the function to return if it's
a "math domain error", which means that other ValueErrors drop through.

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

 status inprogress
 assignee mgorven
 milestone 0.1

Changed in ibid:
assignee: nobody → Michael Gorven (mgorven)
status: Triaged → In Progress
Revision history for this message
Michael Gorven (mgorven) wrote :

 status fixreleased

Changed in ibid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.