[Patches] [ python-Patches-448038 ] a move function for shutil.py

noreply@sourceforge.net noreply@sourceforge.net
Sat, 09 Mar 2002 03:24:05 -0800


Patches item #448038, was opened at 2001-08-05 02:08
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=448038&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: William McVey (wamcvey)
Assigned to: Nobody/Anonymous (nobody)
Summary: a move function for shutil.py

Initial Comment:
Although shutil.py has some nice copy functions but no
real equivalent of mv(1).  This is a very simple
implimentation (as in not a whole lot of stuff has been
implimented) but it's functional.  Simply calls rename,
and if that fails tries to copy and unlink.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-03-09 12:24

Message:
Logged In: YES 
user_id=21627

Here is an attempt to provide error handling for copytree.
It collects all exceptions in a list, and raises them as
shutil.Error.

This would be inconsistent with shutil.rmtree, which offers
the choice of ignore errors,invoke an error callback, or
raise an exception at the problem.

Which of these alternatives would you like to see implemented?

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-08 17:41

Message:
Logged In: YES 
user_id=6380

This is OK, but only perpetuates the problem with this
module -- it doesn't have a decent error handling strategy
(prints to stdout!?!?!?!).

If someone wants to put some more effort in this, I would
recommend at least adding an option to copytree() to control
error handling.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=448038&group_id=5470