summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-02-23 21:36:32 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-02-23 21:36:32 (GMT)
commita4c93b68f164e6e3db881e9af5f0fdc9153680d4 (patch)
tree94986d15a04eae2132c6037bed41c30ecb4ec2ef /Lib/shutil.py
parent61fe64d5de313dd66e7d42940f54b69ef371fc4f (diff)
downloadcpython-a4c93b68f164e6e3db881e9af5f0fdc9153680d4.zip
cpython-a4c93b68f164e6e3db881e9af5f0fdc9153680d4.tar.gz
cpython-a4c93b68f164e6e3db881e9af5f0fdc9153680d4.tar.bz2
Fix SF bug #691276, shutil.copytree documentation bug
Also use True/False instead of 1/0 for symlink flag.
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index f161c6a..5341786 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -83,11 +83,11 @@ def copy2(src, dst):
copystat(src, dst)
-def copytree(src, dst, symlinks=0):
+def copytree(src, dst, symlinks=False):
"""Recursively copy a directory tree using copy2().
The destination directory must not already exist.
- Error are reported to standard output.
+ If exception(s) occur, an Error is raised with a list of reasons.
If the optional symlinks flag is true, symbolic links in the
source tree result in symbolic links in the destination tree; if
@@ -164,7 +164,7 @@ def move(src, dst):
os.rename(src, dst)
except OSError:
if os.path.isdir(src):
- copytree(src, dst, symlinks=1)
+ copytree(src, dst, symlinks=True)
rmtree(src)
else:
copy2(src,dst)