This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: fix bug #682813: dircache.listdir doesn't signal error
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: brett.cannon, loewis, mbrierst
Priority: normal Keywords: patch

Created on 2003-03-20 22:13 by mbrierst, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patchdircache mbrierst, 2003-03-20 22:14
Messages (3)
msg43069 - (view) Author: Michael Stone (mbrierst) Date: 2003-03-20 22:13
Attached small patch makes dircache.listdir
raise OSError when encountered in
os.stat or os.listdir.  This certainly seems
like the right thing to do to be consistent
with os.listdir, though there may have been
a reason not to raise the exception I don't know
about, as it is obviously being purposefully caught
right now.  If there is a reason, someone let me
know and I'll submit a patch to change dircache's
documentation to reflect its behavior.

The test case is also updated by the patch.
msg43070 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-03-21 02:03
Logged In: YES 
user_id=357491

Patch looks good.

Don't let the wording in the description mislead you, though.  No exception is specifically raised; it just is not caught anymore.

As for whether this patch should be applied or not I have no clue since I never use the module.
msg43071 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-09-20 15:54
Logged In: YES 
user_id=21627

Thanks for the patch; I have committed it as

whatsnew24.tex 1.3
dircache.py 1.12
test_dircache.py 1.6
NEWS 1.857

I will not backport it to 2.3 or earlier, because that is a
behaviour change.
History
Date User Action Args
2022-04-10 16:07:48adminsetgithub: 38192
2003-03-20 22:13:45mbrierstcreate