Commit cfcc9779 authored by Éric Araujo's avatar Éric Araujo

Remove unused names in except clauses

parent 25785e9c
......@@ -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))
......
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