[blivet:master 05/20] Add a log message and disable W0703 warning.
mulhern
amulhern at redhat.com
Fri Apr 11 18:03:47 UTC 2014
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/__init__.py | 10 ++++++++--
blivet/deviceaction.py | 5 +++--
blivet/iscsi.py | 5 +++--
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 5be23de..f181b37 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -2248,7 +2248,9 @@ class CryptTab(object):
try:
self.blkidTab = BlkidTab(chroot=chroot)
self.blkidTab.parse()
- except Exception:
+ # pylint: disable=W0703
+ except Exception as e:
+ log.info("failed to parse blkid.tab: %s", e)
self.blkidTab = None
for line in f.readlines():
@@ -2324,7 +2326,9 @@ def get_containing_device(path, devicetree):
try:
device_name = os.path.basename(os.readlink(link))
- except Exception:
+ # pylint: disable=W0703
+ except Exception as e:
+ log.info("failed to find device name for path %s: %s", path, e)
return None
if device_name.startswith("dm-"):
@@ -2685,7 +2689,9 @@ class FSSet(object):
try:
device.setup()
+ # pylint: disable=W0703
except Exception as e:
+ log.info("unable to set up device %s: %s", device, e)
if errorHandler.cb(e) == ERROR_RAISE:
raise
else:
diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
index 4a50a1a..1e9abb6 100644
--- a/blivet/deviceaction.py
+++ b/blivet/deviceaction.py
@@ -335,8 +335,9 @@ class ActionDestroyDevice(DeviceAction):
if self.device.partedDevice:
try:
self.device.partedDevice.removeFromCache()
- except Exception:
- pass
+ # pylint: disable=W0703
+ except Exception as e:
+ log.info("failed to remove info for device %s from libparted cache: %s", self.device, e)
def requires(self, action):
""" Return True if self requires action.
diff --git a/blivet/iscsi.py b/blivet/iscsi.py
index 977f40f..18b8c86 100644
--- a/blivet/iscsi.py
+++ b/blivet/iscsi.py
@@ -86,8 +86,9 @@ class iscsi(object):
initiatorname = libiscsi.get_firmware_initiator_name()
self._initiator = initiatorname
self.initiatorSet = True
- except Exception:
- pass
+ # pylint: disable=W0703
+ except Exception as e:
+ log.info("failed to get initiator name from iscsi firmware: %s", e)
# So that users can write iscsi() to get the singleton instance
def __call__(self):
--
1.8.3.1
More information about the anaconda-patches
mailing list