[MERGE] Fix for walkdirs in missing dir with Py2.4 @ win32
John Arbash Meinel
john at arbash-meinel.com
Tue Apr 17 17:11:53 BST 2007
Aaron Bentley wrote:
> John Arbash Meinel wrote:
>> John Arbash Meinel has voted +1.
>> Status is now: Approved
>> Comment:
>> Seems reasonable. I wonder if we want to add a standard place for any of
>> these windows errors that we are defining.
>
> What drives me batty is that we can't refer to the WindowsError class on
> every platform. Sure, not every platform will raise it, but it would be
> much cleaner to do
>
> except WindowsError, e:
> if e.errno != ERROR_PATH_NOT_FOUND:
> raise
> except OSError, e:
> if e.errno != errno.ENOENT:
> raise
>
>
> Aaron
Well, you are missing out on one even greater problem...
WindowsError changed in python2.5 and then changed *back* in a later
python 2.5.
In python 2.4 WindowsError.errno ==> a windows error number
then in 2.5 it switched so that .errno => an standard errno, and
winerror was a windows error number
In 2.5.1rc1 they changed it back to the 2.4 meaning.
And WindowsError inherits from OSError, so you start doing crazy stuff
(which we are currently doing).
I completely agree that WindowsError should at least be a defined
exception object on all platforms.
John
=:->
More information about the bazaar
mailing list