John A Meinel wrote:
[...]
> > 83 + except OSError: # enoent
> >
> > That's a bit odd. Why not actually check that the exc.errno == ENOENT?
>
> Because I figured EPERM and EANYTHINGELSE would be just as reasonable.
> All we are doing here is trying to translate "foo" => "Foo" based on
> what is in the filesytem. If we can't access the filesystem, we have
> nothing to translate.
Ah ok. Then I'd just remove the “# enoent” comment, because it seems to
imply that you only care about that one errno.
John A Meinel wrote:
[...]
> > 83 + except OSError: # enoent
> >
> > That's a bit odd. Why not actually check that the exc.errno == ENOENT?
>
> Because I figured EPERM and EANYTHINGELSE would be just as reasonable.
> All we are doing here is trying to translate "foo" => "Foo" based on
> what is in the filesytem. If we can't access the filesystem, we have
> nothing to translate.
Ah ok. Then I'd just remove the “# enoent” comment, because it seems to
imply that you only care about that one errno.
-Andrew.