]> granicus.if.org Git - python/commitdiff
few pep8 fixes
authorTarek Ziadé <ziade.tarek@gmail.com>
Mon, 19 Apr 2010 21:13:03 +0000 (21:13 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Mon, 19 Apr 2010 21:13:03 +0000 (21:13 +0000)
Lib/shutil.py

index 0dfc7c7fe0906fac63c1c69df43e1afe1422421e..a94c5e1ea73a33a6f973ada4e5d6f4aaba97f845 100644 (file)
@@ -53,7 +53,7 @@ def copyfileobj(fsrc, fdst, length=16*1024):
 
 def _samefile(src, dst):
     # Macintosh, Unix.
-    if hasattr(os.path,'samefile'):
+    if hasattr(os.path, 'samefile'):
         try:
             return os.path.samefile(src, dst)
         except OSError:
@@ -66,7 +66,7 @@ def _samefile(src, dst):
 def copyfile(src, dst):
     """Copy data from src to dst"""
     if _samefile(src, dst):
-        raise Error, "`%s` and `%s` are the same file" % (src, dst)
+        raise Error("`%s` and `%s` are the same file" % (src, dst))
 
     fsrc = None
     fdst = None
@@ -109,7 +109,8 @@ def copystat(src, dst):
         try:
             os.chflags(dst, st.st_flags)
         except OSError, why:
-            if not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP:
+            if (not hasattr(errno, 'EOPNOTSUPP') or
+                why.errno != errno.EOPNOTSUPP):
                 raise
 
 def copy(src, dst):