[Python-bugs-list] dircache can't distinguish between empty directories and nonexistant ones (PR#142)

dbt@meat.net dbt@meat.net
Tue, 30 Nov 1999 06:26:31 -0500 (EST)


Full_Name: David Terrell
Version: 1.5.2
OS: OpenBSD 2.6
Submission from: luciana.catch22.org (209.157.133.198)


It seems like this would be the ideal place to use some sort of 
exception.  It seems silly to do a stat on it myself then call 
dircache which does the same thing.

Python 1.5.2 (#2, Nov 27 1999, 14:43:38)  [GCC 2.95.1 19990816 (release)] on
openbsd2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import dircache
>>> dircache.listdir("/altroot")
[]
>>> dircache.listdir("/foobarbleh")
[]
>>> ^D
dbt@luciana:src/python>ls -d /altroot /foobarbleh
ls: /foobarbleh: No such file or directory
/altroot