[Python-checkins] r73251 - in python/branches/py3k: Lib/shutil.py

benjamin.peterson python-checkins at python.org
Fri Jun 5 21:13:28 CEST 2009


Author: benjamin.peterson
Date: Fri Jun  5 21:13:27 2009
New Revision: 73251

Log:
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
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/shutil.py

Modified: python/branches/py3k/Lib/shutil.py
==============================================================================
--- python/branches/py3k/Lib/shutil.py	(original)
+++ python/branches/py3k/Lib/shutil.py	Fri Jun  5 21:13:27 2009
@@ -58,9 +58,10 @@
         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')


More information about the Python-checkins mailing list