[issue1112955] move_file()'s return value when dry_run=1 unclear

Éric Araujo report at bugs.python.org
Sat Feb 25 07:51:00 CET 2012


Éric Araujo <merwok at netwok.org> added the comment:

My opinion about dry-run modes is that the goal is to be as close as possible to the real operation, but leave the world in a clean state.  Therefore, testing for file existence is okay (nevermind about modifying the last accessed time, it isn’t important IMO), but creating a file is not okay.  So I’m perfectly fine if calling the function with dry_run=1 will now not always succeed.  You want to see that error when running in dry-run mode.

I’ll improve the test and commit the patch.

packaging uses shutil.move directly, which does not return anything; I will check if packaging does not need it or if we have a regression and need to improve shutil.move in 3.3.

----------
assignee: tarek -> eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1112955>
_______________________________________


More information about the Python-bugs-list mailing list