A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-May/035585.html below:

[Python-Dev] os.walk() silently ignores errors

[Python-Dev] os.walk() silently ignores errors [Python-Dev] os.walk() silently ignores errorsMark Russell mrussell@verio.net
Tue, 13 May 2003 16:40:07 +0100
>Ignoring is definitely the right thing to do by default, as otherwise
>the existence of a single unreadable directory would cause your entire
>walk to fail.  What's your use case for wanting to do something else?

I was using os.walk() to copy a directory tree with some modifications - I
assumed that as no exceptions had been raised the tree had been copied
successfully.  It was only when I diffed the original and copy trees that I
found some directories had been skipped because they were unreadable.
Had I not checked I would have silently lost data - not behaviour I expect
from a python script :-)

Mark





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4