Commit 31a673da authored by Tarek Ziadé's avatar Tarek Ziadé

removed non needed lines

parent d2f3e3fc
...@@ -67,8 +67,6 @@ def copyfile(src, dst): ...@@ -67,8 +67,6 @@ def copyfile(src, 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
fdst = None
for fn in [src, dst]: for fn in [src, dst]:
try: try:
st = os.stat(fn) st = os.stat(fn)
...@@ -79,6 +77,7 @@ def copyfile(src, dst): ...@@ -79,6 +77,7 @@ def copyfile(src, dst):
# XXX What about other special files? (sockets, devices...) # XXX What about other special files? (sockets, devices...)
if stat.S_ISFIFO(st.st_mode): if stat.S_ISFIFO(st.st_mode):
raise SpecialFileError("`%s` is a named pipe" % fn) raise SpecialFileError("`%s` is a named pipe" % fn)
with open(src, 'rb') as fsrc: with open(src, 'rb') as fsrc:
with open(dst, 'wb') as fdst: with open(dst, 'wb') as fdst:
copyfileobj(fsrc, fdst) copyfileobj(fsrc, fdst)
......
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