Message208101
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. |
|
Date |
User |
Action |
Args |
2014-01-14 16:11:13 | r.david.murray | set | recipients:
+ r.david.murray, shellster |
2014-01-14 16:11:13 | r.david.murray | set | messageid: <1389715873.31.0.150651452045.issue20259@psf.upfronthosting.co.za> |
2014-01-14 16:11:13 | r.david.murray | link | issue20259 messages |
2014-01-14 16:11:13 | r.david.murray | create | |
|