string exception in bzrlib/bundle/bundle_data.py

Bug #586926 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

String exceptions are illegal in Python 2.6. Line 334 in bzrlib/bundle/bundle_data.py (as of this writing, in lp:bzr) is thus broken:

                except ValueError:
                    raise 'Value %r has no colon' % info_item

Found by Jakub Wilk in debian-python.

Related branches

Revision history for this message
John A Meinel (jameinel) wrote :

A simple and appropriate fix.

=== modified file 'bzrlib/bundle/bundle_data.py'
--- bzrlib/bundle/bundle_data.py 2009-09-20 22:12:36 +0000
+++ bzrlib/bundle/bundle_data.py 2010-05-28 17:55:24 +0000
@@ -331,7 +331,7 @@
                 try:
                     name, value = info_item.split(':', 1)
                 except ValueError:
- raise 'Value %r has no colon' % info_item
+ raise ValueError('Value %r has no colon' % info_item)
                 if name == 'last-changed':
                     last_changed = value
                 elif name == 'executable':

Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.0.6
status: New → 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.