[blivet:master 09/10] Remove some unused exception names.
mulhern
amulhern at redhat.com
Tue Mar 25 15:49:08 UTC 2014
Where the code is:
except <SomeException> as <var>:
<some code>
and <var> is never used, change to:
except <SomeException>:
<some code>
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/__init__.py | 2 +-
blivet/devicetree.py | 2 +-
blivet/util.py | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index e358e54..2385d26 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -2174,7 +2174,7 @@ def mountExistingSystem(fsset, rootDevice,
try:
device.setup()
- except DeviceError as e:
+ except DeviceError:
# we'll catch this in the main loop
continue
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index f28febc..9a00918 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1782,7 +1782,7 @@ class DeviceTree(object):
try:
kwargs["vgName"] = udev_device_get_vg_name(info)
- except KeyError as e:
+ except KeyError:
log.warning("PV %s has no vg_name", name)
try:
kwargs["vgUuid"] = udev_device_get_vg_uuid(info)
diff --git a/blivet/util.py b/blivet/util.py
index adc9cd5..2a002f2 100644
--- a/blivet/util.py
+++ b/blivet/util.py
@@ -75,7 +75,7 @@ def mount(device, mountpoint, fstype, options=None):
argv = ["mount", "-t", fstype, "-o", options, device, mountpoint]
try:
rc = run_program(argv)
- except OSError as e:
+ except OSError:
raise
return rc
@@ -84,7 +84,7 @@ def umount(mountpoint):
udev_settle()
try:
rc = run_program(["umount", mountpoint])
- except OSError as e:
+ except OSError:
raise
return rc
--
1.8.3.1
More information about the anaconda-patches
mailing list