Any incompatibilities between 0.6.2 and 0.7 releases?
John A Meinel
john at arbash-meinel.com
Thu Jan 26 14:04:25 GMT 2006
Martin Pool wrote:
> On 25 Jan 2006, John A Meinel <john at arbash-meinel.com> wrote:
>
>> You know, we probably should have fixed the exception. We could do a
>> 'try/except' around the import xml.sax and if it fails, we could let the
>> user know what is (probably) going on.
>>
>> I can put a quick fix into my jam-pending branch, though it is a little
>> late for 0.7 :)
>
> Yes, at least giving a specific error would be good.
>
How is this patch? It is a pretty simple fix, committed as revno 1510 on
my jam-pending branch.
John
=:->
=== modified file 'bzrlib/branch.py'
--- bzrlib/branch.py
+++ bzrlib/branch.py
@@ -20,7 +20,13 @@
import os
import errno
from warnings import warn
-import xml.sax.saxutils
+try:
+ import xml.sax.saxutils
+except ImportError:
+ raise ImportError("We were unable to import 'xml.sax.saxutils',"
+ " most likely you have an xml.pyc or xml.pyo file"
+ " lying around in your bzrlib directory."
+ " Please remove it.")
from cStringIO import StringIO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060126/dc49cf21/attachment.pgp
More information about the bazaar
mailing list