[issue14773] fwalk breaks on dangling symlinks

2012-05-16 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue14773] fwalk breaks on dangling symlinks

2012-05-16 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue14773] fwalk breaks on dangling symlinks

2012-05-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset cbe7560d4443 by Hynek Schlawack in branch 'default': #14773: Fix os.fwalk() failing on dangling symlinks http://hg.python.org/cpython/rev/cbe7560d4443 -- nosy: +python-dev ___ Python tracker

[issue14773] fwalk breaks on dangling symlinks

2012-05-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14773] fwalk breaks on dangling symlinks

2012-05-15 Thread Hynek Schlawack
Hynek Schlawack added the comment: I just realized it doesn't really make sense because if a file disappears for real, we'll get another FileNotFoundException when checking whether it's a symlink and the continue is never reached. So behold v3. :) This time, I have tested it by injecting a

[issue14773] fwalk breaks on dangling symlinks

2012-05-13 Thread Charles-François Natali
Charles-François Natali added the comment: > Just to stress it once more: a fwalk that _ignores_ dangling symlinks is > worthless for rmtree. And wasn't rmtree the initial reason to implement fwalk > in the first place? ;) Indeed, my bad :-) > So I've changed the patch to ignore everything m

[issue14773] fwalk breaks on dangling symlinks

2012-05-12 Thread Hynek Schlawack
Hynek Schlawack added the comment: So I've changed the patch to ignore everything missing except for dangling links (which throw unfortunately the same exception). Just to stress it once more: a fwalk that _ignores_ dangling symlinks is worthless for rmtree. And wasn't rmtree the initial reas

[issue14773] fwalk breaks on dangling symlinks

2012-05-12 Thread Hynek Schlawack
Hynek Schlawack added the comment: But if it is a dangling symlink, you want to add it to nondirs while missing files could be skipped, no? You can't skip dangling symlinks if you want to implement rmtree. The normal walk() doesn't too. -- ___ Pyth

[issue14773] fwalk breaks on dangling symlinks

2012-05-12 Thread Charles-François Natali
Charles-François Natali added the comment: I'm not sure we really need to check for a dangling symlink in case of FileNotFoundError: whether it's a dangling symlink, or the file disappeared in-between-, skipping it is OK. -- ___ Python tracker

[issue14773] fwalk breaks on dangling symlinks

2012-05-10 Thread Hynek Schlawack
New submission from Hynek Schlawack : I'm implementing a safe rmtree using fwalk. Everything works perfectly except for one thing: if the directory contains dangling symlinks, fwalk goes belly-up: $ ls -l test/ total 0 lrwxrwxrwx 1 vagrant vagrant 4 May 10 16:36 doesntwork -> this $ ./python P