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.

Author r.david.murray
Recipients r.david.murray, shellster
Date 2014-01-14.16:11:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389715873.31.0.150651452045.issue20259@psf.upfronthosting.co.za>
In-reply-to
Content
That's not how Python works.  If you print out currentDir, you will see that os.listdir is never called on the folder for which you do not have permission.  That is, os.walk does indeed catch the listdir error, when *it* does the listdir, does not try to descend into that subdirectory.

If you want to do something with the error (such as raise it), use the 'onerror' argument of walk.
History
Date User Action Args
2014-01-14 16:11:13r.david.murraysetrecipients: + r.david.murray, shellster
2014-01-14 16:11:13r.david.murraysetmessageid: <1389715873.31.0.150651452045.issue20259@psf.upfronthosting.co.za>
2014-01-14 16:11:13r.david.murraylinkissue20259 messages
2014-01-14 16:11:13r.david.murraycreate