[PATCH] Correct use of GetLastError in ctypes windows locking code

Martin (gzlist) gzlist at googlemail.com
Thu Jun 4 00:29:16 BST 2009


While rediscovering that bazaar doesn't work under Win98 due to
locking failures, noticed a simple problem was causing the errors to
be even less helpful than they would be otherwise. Attached patch
fixes the problem.

Original patch also used ctypes.FormatError but can't see any
guideline in the devdocs on what the encoding of strings in Exception
objects needs to be to get on to the console in a sane manner. (For
instance, under German windows, the message will be encoded as CP1252
but the console may be CP850).

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctypes_windows_locking.bundle
Type: application/octet-stream
Size: 3201 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090604/7ae2b043/attachment-0001.obj 


More information about the bazaar mailing list