[Python-checkins] cpython: Remove unused names in except clauses

eric.araujo python-checkins at python.org
Fri Aug 12 18:03:58 CEST 2011


http://hg.python.org/cpython/rev/552efc3eb45c
changeset: 71828:552efc3eb45c
parent: 71825:360f6f4b9ecb
user: Éric Araujo <merwok at netwok.org>
date: Wed Aug 10 20:54:33 2011 +0200
summary:
 Remove unused names in except clauses
files:
 Lib/shutil.py | 6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/shutil.py b/Lib/shutil.py
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -267,7 +267,7 @@
 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 @@
 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 @@
 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))
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /