summaryrefslogtreecommitdiffstats
path: root/Doc/library/shutil.rst
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-20 15:14:11 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-20 15:14:11 (GMT)
commit9bd667ad030913ead3a789f45e73c26f9f28fb46 (patch)
treeea9c145cdcc74d4f1b0b084b083f9286a878c513 /Doc/library/shutil.rst
parent78b11870a4c441e42cf60dca3a6d22f5896311ba (diff)
downloadcpython-9bd667ad030913ead3a789f45e73c26f9f28fb46.zip
cpython-9bd667ad030913ead3a789f45e73c26f9f28fb46.tar.gz
cpython-9bd667ad030913ead3a789f45e73c26f9f28fb46.tar.bz2
Merged revisions 60124-60142 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r60131 | georg.brandl | 2008-01-20 12:13:29 +0100 (Sun, 20 Jan 2008) | 3 lines #1351692: in pprint, always call format() for dict and list items to enable custom formatting of contents via subclassing PrettyPrinter. ........ r60133 | georg.brandl | 2008-01-20 12:43:03 +0100 (Sun, 20 Jan 2008) | 2 lines #1178141: add addinfourl.code to get http status code from urllib. ........ r60134 | georg.brandl | 2008-01-20 13:05:43 +0100 (Sun, 20 Jan 2008) | 4 lines #856047: respect the ``no_proxy`` env var when checking for proxies in urllib and using the other ``_proxy`` env vars. Original patch by Donovan Baarda. ........ r60135 | georg.brandl | 2008-01-20 13:18:17 +0100 (Sun, 20 Jan 2008) | 4 lines #1664522: in urllib, don't read non-existing directories in ftp mode, returning a 0-byte file -- raise an IOError instead. Original patch from Phil Knirsch. ........ r60136 | georg.brandl | 2008-01-20 13:57:47 +0100 (Sun, 20 Jan 2008) | 2 lines #799369: document possible sys.platform values. ........ r60137 | georg.brandl | 2008-01-20 14:08:37 +0100 (Sun, 20 Jan 2008) | 2 lines #652749: document the constants added to the builtins by site.py. ........ r60138 | georg.brandl | 2008-01-20 14:59:46 +0100 (Sun, 20 Jan 2008) | 2 lines #1648: add sys.gettrace() and sys.getprofile(). ........ r60139 | georg.brandl | 2008-01-20 15:17:42 +0100 (Sun, 20 Jan 2008) | 2 lines #1669: don't allow shutil.rmtree() to be called on a symlink. ........ r60140 | georg.brandl | 2008-01-20 15:20:02 +0100 (Sun, 20 Jan 2008) | 2 lines Fix test_pyclbr after urllib change. ........ r60141 | christian.heimes | 2008-01-20 15:28:28 +0100 (Sun, 20 Jan 2008) | 1 line Fixed a wrong assumption in configure.in and Include/pyport.h. The is finite function is not called isfinite() but finite(). Sorry, my fault. :) ........ r60142 | georg.brandl | 2008-01-20 15:31:27 +0100 (Sun, 20 Jan 2008) | 2 lines #1876: fix typos in test_operator. ........
Diffstat (limited to 'Doc/library/shutil.rst')
-rw-r--r--Doc/library/shutil.rst30
1 files changed, 18 insertions, 12 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index f80c893..db4a259 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -93,18 +93,24 @@ copying and removal. For operations on individual files, see also the
.. index:: single: directory; deleting
- Delete an entire directory tree (*path* must point to a directory). If
- *ignore_errors* is true, errors resulting from failed removals will be ignored;
- if false or omitted, such errors are handled by calling a handler specified by
- *onerror* or, if that is omitted, they raise an exception.
-
- If *onerror* is provided, it must be a callable that accepts three parameters:
- *function*, *path*, and *excinfo*. The first parameter, *function*, is the
- function which raised the exception; it will be :func:`os.listdir`,
- :func:`os.remove` or :func:`os.rmdir`. The second parameter, *path*, will be
- the path name passed to *function*. The third parameter, *excinfo*, will be the
- exception information return by :func:`sys.exc_info`. Exceptions raised by
- *onerror* will not be caught.
+ Delete an entire directory tree; *path* must point to a directory (but not a
+ symbolic link to a directory). If *ignore_errors* is true, errors resulting
+ from failed removals will be ignored; if false or omitted, such errors are
+ handled by calling a handler specified by *onerror* or, if that is omitted,
+ they raise an exception.
+
+ If *onerror* is provided, it must be a callable that accepts three
+ parameters: *function*, *path*, and *excinfo*. The first parameter,
+ *function*, is the function which raised the exception; it will be
+ :func:`os.path.islink`, :func:`os.listdir`, :func:`os.remove` or
+ :func:`os.rmdir`. The second parameter, *path*, will be the path name passed
+ to *function*. The third parameter, *excinfo*, will be the exception
+ information return by :func:`sys.exc_info`. Exceptions raised by *onerror*
+ will not be caught.
+
+ .. versionchanged:: 2.6
+ Explicitly check for *path* being a symbolic link and raise :exc:`OSError`
+ in that case.
.. function:: move(src, dst)