summaryrefslogtreecommitdiff
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-08-10 20:54:33 +0200
committerÉric Araujo <merwok@netwok.org>2011-08-10 20:54:33 +0200
commit32d48949f924c0f1892f5471c13c59e37edbae24 (patch)
treef4bc74156dcf6795df7e1fafec1be32e725607f7 /Lib/shutil.py
parent8ccb659cd9032ee6aa8823f6add2548d7259eae2 (diff)
downloadcpython-32d48949f924c0f1892f5471c13c59e37edbae24.tar.gz
Remove unused names in except clauses
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 329add0456..8718884530 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -267,7 +267,7 @@ def rmtree(path, ignore_errors=False, onerror=None):
names = []
try:
names = os.listdir(path)
- except os.error as err:
+ except os.error:
onerror(os.listdir, path, sys.exc_info())
for name in names:
fullname = os.path.join(path, name)
@@ -280,7 +280,7 @@ def rmtree(path, ignore_errors=False, onerror=None):
else:
try:
os.remove(fullname)
- except os.error as err:
+ except os.error:
onerror(os.remove, fullname, sys.exc_info())
try:
os.rmdir(path)
@@ -323,7 +323,7 @@ def move(src, dst):
raise Error("Destination path '%s' already exists" % real_dst)
try:
os.rename(src, real_dst)
- except OSError as exc:
+ except OSError:
if os.path.isdir(src):
if _destinsrc(src, dst):
raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst))