Georg Brandl
7a3fd89994
Bug #1472949 : stringify IOErrors in shutil.copytree when appending
...
them to the Error errors list.
2006-04-28 16:54:25 +00:00
Neal Norwitz
4ce69a5b06
No need to import exceptions, they are builtins
2005-09-01 00:45:28 +00:00
Georg Brandl
a1be88e24d
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
2005-08-31 22:48:45 +00:00
Johannes Gijsbers
926d45bb4e
shutil.copytree: move copystat call for the directory after the loop
...
copying files inside the directory, as that loop changes the atime and
mtime.
2005-01-23 12:20:15 +00:00
Johannes Gijsbers
e4172eadf3
Patch #1094015 :
...
* Use os.makedirs() instead os.mkdir(). (bug #975763 )
* Use copystat() to copy directory bits (bug #1048878 )
2005-01-08 12:31:29 +00:00
Johannes Gijsbers
ef5ffc4765
Bug #1048941 : shutil.rmtree error handling was always broken
...
Rewrite rmtree again, this time without os.walk(). Error handling had been
broken since Python 2.3, and the os.walk() version inherited this.
2004-10-31 12:05:31 +00:00
Johannes Gijsbers
7db385eef5
Rewrite rmtree using os.walk to fix bug #1025127 :
...
The shutils.rmtree() implementation uses an excessive amount of memory when
deleting large directory hierarchies. Before actually deleting any files, it
builds up a list of (function, filename) tuples for all the files that it is
going to remove.
2004-10-07 21:10:08 +00:00
Johannes Gijsbers
f9a098efe1
Catch OSError raised when src or dst argument to os.path.samefile doesn't
...
exist.
2004-08-14 14:51:01 +00:00
Johannes Gijsbers
46f1459860
Raise an exception when src and dst refer to the same file via a hard link or a
...
symbolic link (bug #851123 / patch #854853 , thanks Gregory Ball).
2004-08-14 13:30:02 +00:00
Guido van Rossum
4a2ccdf781
- Bug #981530 : Fix UnboundLocalError in shutil.rmtree(). This affects
...
the documented behavior: the function passed to the onerror()
handler can now also be os.listdir.
[I could've sworn I checked this in, but apparently I didn't, or it
got lost???]
2004-07-14 00:45:59 +00:00
Brett Cannon
1c3fa18be7
shutil.move() will raise an exception when trying to move a directory into
...
itself.
Closes bug #919012 . Thanks Johannes Gijsbers.
2004-06-19 21:11:35 +00:00
Neal Norwitz
a4c93b68f1
Fix SF bug #691276 , shutil.copytree documentation bug
...
Also use True/False instead of 1/0 for symlink flag.
2003-02-23 21:36:32 +00:00
Barry Warsaw
234d9a9eb3
rmtree(): Make implementation agree with documentation (both latex and
...
docstring). Even if ignore_errors was true, an exception would occur
if path didn't exist.
2003-01-24 17:36:15 +00:00
Just van Rossum
66d16baf71
- squashed bare except in rmtree()
...
- improved readability of rmtree; removed silly apply()
2003-01-05 19:44:11 +00:00
Raymond Hettinger
2b9bfb33ff
Added new move() function to __all__.
2002-10-30 05:44:50 +00:00
Martin v. Löwis
e9ce0b0fea
Patch #448038 : Add move(). Report errors from copytree as in shutil.Error.
2002-10-07 13:23:24 +00:00
Raymond Hettinger
57e79459fa
shutil.copyfile(src,dst) was clobbering the file when the src and dst were
...
the same. Added check to verify the two names are not the same. Does not
check the actual files to see if there is a symbolic link.
Closes SF bug 490165 and Tzot's patch 604600.
2002-09-08 20:43:59 +00:00
Walter Dörwald
294bbf3a59
Replace obsolete stat module constants with
...
equivalent attributes in a few more spots.
This closes SF patch http://www.python.org/sf/562373
2002-06-06 09:48:13 +00:00
Raymond Hettinger
f13eb55d59
Replace boolean test with is None.
2002-06-02 00:40:05 +00:00
Skip Montanaro
0de65807e6
bunch more __all__ lists
...
also modified check_all function to suppress all warnings since they aren't
relevant to what this test is doing (allows quiet checking of regsub, for
instance)
2001-02-15 22:15:14 +00:00
Tim Peters
0c94724cc7
Patch #103342 : Make shutil.copytree more useful under Jython.
2001-01-21 20:00:00 +00:00
Tim Peters
495ad3c8cc
Whitespace normalization.
2001-01-15 01:36:40 +00:00
Greg Stein
42bb8b3987
apply patch #100868 from Moshe Zadka:
...
refactor the copying of file data. new: shutil.copyfileobj(fsrc, fdst)
2000-07-12 09:55:30 +00:00
Fred Drake
5fa38862bb
Fred Gansevles <gansevle@cs.utwente.nl>:
...
The copytree function doesn't pass the symlinks parameter in recursicve
calls
2000-04-07 14:34:50 +00:00
Guido van Rossum
e7b146fb3b
The third and final doc-string sweep by Ka-Ping Yee.
...
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.
A new docstring was added to formatter. The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.
2000-02-04 15:28:42 +00:00