Martin v. Löwis wrote: > Robert Brewer wrote: > > Inside the app (running under LocalSystem on the same Win2k > machine): > > os.stat() raises OSError: [Errno 2] No such file or directory, > > os.path.exists() returns False, and > > os.access() returns False. > > LocalSystem cannot access network shares. However, this is OT for > python-dev. Completely understood about LocalSystem. But IMO, os.stat should raise a more specific and correct error. As you pointed out, calling open() raises "IOError: [Errno 13] Permission denied"; it would be nice if stat did the same (in my example). The platform-specific API call (for example, Windows _stati64) doesn't provide this--it would require another test inside posix_do_stat to return a more appropriate error. But it would be a nice touch for us end-users. In my opinion, "no such file" is the wrong error message and is therefore a bug. But I can accept others disagreeing, since os.stat() simply wraps Windows' _stat* calls (at least, in my example). Robert Brewer MIS Amor Ministries fumanchu at amor.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4