summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-05-05 22:41:25 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-05-05 22:41:25 (GMT)
commit31a673da52dcc5cbf2a25dd732de3ee389a4a319 (patch)
treeaec7a3cbd475e770e8fabba59d4f70e54b15ca54
parentd2f3e3fc1df593423a69911ea84e4b0acd1edf1f (diff)
downloadcpython-31a673da52dcc5cbf2a25dd732de3ee389a4a319.zip
cpython-31a673da52dcc5cbf2a25dd732de3ee389a4a319.tar.gz
cpython-31a673da52dcc5cbf2a25dd732de3ee389a4a319.tar.bz2
removed non needed lines
-rw-r--r--Lib/shutil.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index f02a2d9..1d86df3 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -67,8 +67,6 @@ def copyfile(src, dst):
if _samefile(src, dst):
raise Error("`%s` and `%s` are the same file" % (src, dst))
- fsrc = None
- fdst = None
for fn in [src, dst]:
try:
st = os.stat(fn)
@@ -79,6 +77,7 @@ def copyfile(src, dst):
# XXX What about other special files? (sockets, devices...)
if stat.S_ISFIFO(st.st_mode):
raise SpecialFileError("`%s` is a named pipe" % fn)
+
with open(src, 'rb') as fsrc:
with open(dst, 'wb') as fdst:
copyfileobj(fsrc, fdst)