[blivet:master 2/7] Get rid of old exception unpacking syntax

mulhern amulhern at redhat.com
Thu Mar 27 14:38:58 UTC 2014


From: David Shea <dshea at redhat.com>

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devicetree.py   | 4 ++--
 blivet/partitioning.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 53f2d55..479bb55 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -2163,8 +2163,8 @@ class DeviceTree(object):
         for device in self.leaves:
             try:
                 device.setup()
-            except DeviceError as (msg, name):
-                log.error("setup of %s failed: %s", device.name, msg)
+            except DeviceError as e:
+                log.error("setup of %s failed: %s", device.name, e)
 
     def getDeviceBySysfsPath(self, path, incomplete=False, hidden=False):
         """ Return a list of devices with a matching sysfs path.
diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index 0b5f368..d19a6d9 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -857,8 +857,8 @@ def doPartitioning(storage):
     for disk in disks:
         try:
             disk.setup()
-        except DeviceError as (msg, name):
-            log.error("failed to set up disk %s: %s", name, msg)
+        except DeviceError as e:
+            log.error("failed to set up disk %s: %s", e.name, e)
             raise PartitioningError(_("disk %s inaccessible") % disk.name)
 
     partitions = storage.partitions[:]
-- 
1.8.3.1



More information about the anaconda-patches mailing list