diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-05 19:13:27 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-05 19:13:27 (GMT) |
commit | c0d98aa5c00bf51a0ff7b82d8dad224a19969e43 (patch) | |
tree | 34fcff861eabee08f14da34046cc8e17c5c1f2c8 /Lib/shutil.py | |
parent | ef3e71faac1f8b94797e81c7aa1d14c2209aa0a7 (diff) | |
download | cpython-c0d98aa5c00bf51a0ff7b82d8dad224a19969e43.zip cpython-c0d98aa5c00bf51a0ff7b82d8dad224a19969e43.tar.gz cpython-c0d98aa5c00bf51a0ff7b82d8dad224a19969e43.tar.bz2 |
Merged revisions 73250 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73250 | benjamin.peterson | 2009-06-05 14:09:28 -0500 (Fri, 05 Jun 2009) | 1 line
only test for named pipe when os.stat doesn't raise #6209
........
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 9ef1cf2..dc36820 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -58,9 +58,10 @@ def copyfile(src, dst): except OSError: # File most likely does not exist pass - # XXX What about other special files? (sockets, devices...) - if stat.S_ISFIFO(st.st_mode): - raise SpecialFileError("`%s` is a named pipe" % fn) + else: + # XXX What about other special files? (sockets, devices...) + if stat.S_ISFIFO(st.st_mode): + raise SpecialFileError("`%s` is a named pipe" % fn) try: fsrc = open(src, 'rb') fdst = open(dst, 'wb') |