Python string exceptions no more allowed in Python 2.6

Bug #595888 reported by Alessio Treglia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Listen
Fix Committed
Undecided
Unassigned
listen (Debian)
Fix Released
Unknown

Bug Description

With Python2.6 string exceptions are no longer allowed (they were buggy before too, since they were not guaranteed to work
reliable even in <2.6)

$ python2.5 -c "raise 'eggs'"
-c:1: DeprecationWarning: raising a string exception is deprecated
Traceback (most recent call last):
  File "<string>", line 1, in <module>
eggs

$ python2.6 -c "raise 'eggs'"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: exceptions must be old-style classes or derived from BaseException, not str

Please apply the attached patch.

Revision history for this message
Alessio Treglia (quadrispro) wrote :
Changed in listen (Debian):
status: Unknown → New
Changed in listen (Debian):
status: New → Fix Released
Mehdi Abaakouk (sileht)
Changed in listen:
status: New → Fix Committed
milestone: none → 0.6.6
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.