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 shellster
Recipients shellster
Date 2014-01-14.15:57:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389715078.64.0.968291006177.issue20259@psf.upfronthosting.co.za>
In-reply-to
Content
The problem occurs when you attempt to perform an os.listdir on a directory that you don't have access to.  You should get an exception thrown.  Normally this occurs, however, if you run the following code:

folder = <some parent folder that has a child folder you don't have read access to>
for currentDir, subDirs, files = os.walk(folder):
    temp = os.listdir(currentDir)

temp will hold an empty list on the subdirectory you don't have access to and no exception is thrown.  This appears to be some sort of conflict between os.walk and os.listdir.  Near as I can tell python is caching the subdirectory listing for subDirs (os.walk doesn't throw an error on attempting to read a directory is doesn't have access to, obviously) and returning those results when os.listdir is called.
History
Date User Action Args
2014-01-14 15:57:58shellstersetrecipients: + shellster
2014-01-14 15:57:58shellstersetmessageid: <1389715078.64.0.968291006177.issue20259@psf.upfronthosting.co.za>
2014-01-14 15:57:58shellsterlinkissue20259 messages
2014-01-14 15:57:58shellstercreate