summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-07-19 19:41:02 (GMT)
committerHynek Schlawack <hs@ox.cx>2012-07-19 19:41:02 (GMT)
commit26fe37dd3f5b994722eb093f95e917282368d7da (patch)
tree7ec04c2239d15b0769faaea76fea96c2bd05e5e6 /Lib/shutil.py
parent024abca053dd18b474b41eba2331d35b24c3bae3 (diff)
downloadcpython-26fe37dd3f5b994722eb093f95e917282368d7da.zip
cpython-26fe37dd3f5b994722eb093f95e917282368d7da.tar.gz
cpython-26fe37dd3f5b994722eb093f95e917282368d7da.tar.bz2
#1492704: Backout and wait for 3.4
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 7db9599..a8b9f3f 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -42,9 +42,6 @@ __all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2",
class Error(EnvironmentError):
pass
-class SameFileError(Error):
- """Raised when source and destination are the same file."""
-
class SpecialFileError(EnvironmentError):
"""Raised when trying to do a kind of operation (e.g. copying) which is
not supported on a special file (e.g. a named pipe)"""
@@ -93,7 +90,7 @@ def copyfile(src, dst, *, follow_symlinks=True):
"""
if _samefile(src, dst):
- raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
+ raise Error("`%s` and `%s` are the same file" % (src, dst))
for fn in [src, dst]:
try:
@@ -218,9 +215,6 @@ def copy(src, dst, *, follow_symlinks=True):
If follow_symlinks is false, symlinks won't be followed. This
resembles GNU's "cp -P src dst".
- If source and destination are the same file, a SameFileError will be
- raised.
-
"""
if os.path.isdir(dst):
dst = os.path.join(dst, os.path.basename(src))