Commit f1c28b75 authored by Tarek Ziadé's avatar Tarek Ziadé

few pep8 fixes

parent 7c587bf5
...@@ -53,7 +53,7 @@ def copyfileobj(fsrc, fdst, length=16*1024): ...@@ -53,7 +53,7 @@ def copyfileobj(fsrc, fdst, length=16*1024):
def _samefile(src, dst): def _samefile(src, dst):
# Macintosh, Unix. # Macintosh, Unix.
if hasattr(os.path,'samefile'): if hasattr(os.path, 'samefile'):
try: try:
return os.path.samefile(src, dst) return os.path.samefile(src, dst)
except OSError: except OSError:
...@@ -66,7 +66,7 @@ def _samefile(src, dst): ...@@ -66,7 +66,7 @@ def _samefile(src, dst):
def copyfile(src, dst): def copyfile(src, dst):
"""Copy data from src to dst""" """Copy data from src to dst"""
if _samefile(src, 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 fsrc = None
fdst = None fdst = None
...@@ -109,7 +109,8 @@ def copystat(src, dst): ...@@ -109,7 +109,8 @@ def copystat(src, dst):
try: try:
os.chflags(dst, st.st_flags) os.chflags(dst, st.st_flags)
except OSError, why: except OSError, why:
if not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP: if (not hasattr(errno, 'EOPNOTSUPP') or
why.errno != errno.EOPNOTSUPP):
raise raise
def copy(src, dst): def copy(src, dst):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment