string exception in bzrlib/bundle/

Bug #586926 reported by Barry Warsaw on 2010-05-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

String exceptions are illegal in Python 2.6. Line 334 in bzrlib/bundle/ (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

John A Meinel (jameinel) wrote :

A simple and appropriate fix.

=== modified file 'bzrlib/bundle/'
--- bzrlib/bundle/ 2009-09-20 22:12:36 +0000
+++ bzrlib/bundle/ 2010-05-28 17:55:24 +0000
@@ -331,7 +331,7 @@
                     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) on 2010-05-31
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  Edit
Everyone can see this information.

Other bug subscribers