summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-08-10 18:54:33 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-08-10 18:54:33 (GMT)
commitcfcc9779fc7b756fa1c01b4816e16c7615a9ad3a (patch)
tree78c3fab75a5e21e97770d71e3bc17ebeef0881b4 /Lib/shutil.py
parent25785e9ca581a0197cfb70027f02b85d9851ad54 (diff)
downloadcpython-cfcc9779fc7b756fa1c01b4816e16c7615a9ad3a.zip
cpython-cfcc9779fc7b756fa1c01b4816e16c7615a9ad3a.tar.gz
cpython-cfcc9779fc7b756fa1c01b4816e16c7615a9ad3a.tar.bz2
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 329add0..8718884 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))