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/035576.html below:

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

[Python-Dev] os.walk() silently ignores errors [Python-Dev] os.walk() silently ignores errorsGuido van Rossum guido@python.org
Tue, 13 May 2003 09:51:33 -0400
> I've just noticed that os.walk() silently skips unreadable
> directories.  I think this is surprising behaviour, which at least
> should be documented (there is a comment explaining this is source,
> but nothing in the doc string).  Is it too late to add an optional
> callback argument to handle unreadable directories, so the caller
> could log them, raise an exception or whatever?  I think the default
> behaviour should still be to silently ignore them, but it would be
> nice to have a way to override it.

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?

--Guido van Rossum (home page: http://www.python.org/~guido/)



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