TypeError thrown when None returned by Caiwireless

Bug #917720 reported by Paul Egan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flufl.bounce
Fix Released
Medium
Barry Warsaw

Bug Description

The Caiwireless detector returns None if the message is multipart/mixed but no failures were found.

> ipython
>>> from flufl.bounce import scan_message
>>> from email import message_from_file
>>> scan_message(message_from_file(open('flufl/bounce/tests/data/simple_01.txt')))
No handlers could be found for logger "flufl.bounce"
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/paul/download/flufl.bounce/<ipython-input-3-2eb556669605> in <module>()
----> 1 scan_message(message_from_file(open('flufl/bounce/tests/data/simple_01.txt')))

/home/paul/download/flufl.bounce/flufl/bounce/_scan.pyc in scan_message(msg)
     68 log.info('Running detector: {0}'.format(detector_class))
     69 try:
---> 70 temporary, permanent = detector_class().process(msg)
     71 except Exception:
     72 log.exception('Exception in detector: {0}'.format(detector_class))

TypeError: 'NoneType' object is not iterable

Barry Warsaw (barry)
Changed in flufl.bounce:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Paul Egan (paulegan) wrote :

First time using LaunchPad and not sure if linking a branch generates an email alert... so here's an explicit note:
http://bazaar.launchpad.net/~paulegan/flufl.bounce/caiwireless-bug-917720/revision/28/flufl/bounce/_detectors/caiwireless.py

Barry Warsaw (barry)
Changed in flufl.bounce:
milestone: none → 2.1
Revision history for this message
Barry Warsaw (barry) wrote :

Thanks Paul. Your merge proposal was perfect. I've applied your fix and it will be released as part of flufl.bounce 2.1.

Changed in flufl.bounce:
status: Confirmed → Fix Committed
Barry Warsaw (barry)
Changed in flufl.bounce:
status: Fix Committed → 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.