Crashing Bazaar with a French Windows system :)

John Arbash Meinel john at arbash-meinel.com
Thu Jan 14 15:08:33 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> Philippe Lhoste пишет:
>> Should I open a bug or should I just follow "don't do it!"? :)
> 
> Open a bug, please. It's clearly bug.

Yeah, we need to figure out where we are getting that message from, and
how to make sure to format and interpret it properly. It may be that we
need to catch WindowsError and decode its message using
locale.getpreferredencoding(). Or maybe we can be lucky and there will
be a Unicode api for FormatMessage:
http://msdn.microsoft.com/en-us/library/ms679351%28VS.85%29.aspx

So rather than formatting the WindowsError using str(), we would do a
custom call to FormatMessageW(WindowsError.winerrno, ...)

We have to be a bit careful because of Python's habit of using str() on
exceptions, and that has to return a plain 8-bit string, rather than a
Unicode string, etc.

I think it is possible to fix, but we need some real test data, as it is
highly platform dependent.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktPM3EACgkQJdeBCYSNAAPJVwCfdjvJ3j2nq85fv9Qim2Fzaa8Y
e1UAn2aOuzzvq9vwvhVlC3g6ER5YLQA6
=VRRp
-----END PGP SIGNATURE-----



More information about the bazaar mailing list