summaryrefslogtreecommitdiffstats
path: root/Doc/library/shutil.rst
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-04-20 08:57:33 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-04-20 08:57:33 (GMT)
commitfb437513d67c526c8579c96d2986f1e46f9140ed (patch)
tree7b067a67782884780b0e4e4663bb245091f9f942 /Doc/library/shutil.rst
parent0d2fa4a612570b9abfb0320b0c174ecae5488bf8 (diff)
downloadcpython-fb437513d67c526c8579c96d2986f1e46f9140ed.zip
cpython-fb437513d67c526c8579c96d2986f1e46f9140ed.tar.gz
cpython-fb437513d67c526c8579c96d2986f1e46f9140ed.tar.bz2
Fixed #6547: Added the ignore_dangling_symlinks option to shutil.copytree
Diffstat (limited to 'Doc/library/shutil.rst')
-rw-r--r--Doc/library/shutil.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 8b9ee8e..53e34d7 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -99,6 +99,12 @@ Directory and files operations
symbolic links in the new tree; if false or omitted, the contents of the
linked files are copied to the new tree.
+ When *symlinks* is false, if the file pointed by the symlink doesn't
+ exist, a exception will be added in the list of errors raised in
+ a :exc:`Error` exception at the end of the copy process.
+ You can set the optional *ignore_dangling_symlinks* flag to true if you
+ want to silent this exception.
+
If *ignore* is given, it must be a callable that will receive as its
arguments the directory being visited by :func:`copytree`, and a list of its
contents, as returned by :func:`os.listdir`. Since :func:`copytree` is
@@ -120,6 +126,11 @@ Directory and files operations
Added the *copy_function* argument to be able to provide a custom copy
function.
+ .. versionchanged:: 3.2
+ Added the *ignore_dangling_symlinks* argument to silent dangling symlinks
+ errors when *symlinks* is false.
+
+
.. function:: rmtree(path, ignore_errors=False, onerror=None)
.. index:: single: directory; deleting