[PATCH 4/5] error messages of zFCP on s390: log or pass to the UI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 kickstart.py            |    5 ++++-
 storage/zfcp.py         |   12 +++++++++---
 textw/partition_text.py |    5 ++++-
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index a53dac9..bf61333 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -966,7 +966,10 @@ class ZFCP(commands.zfcp.FC3_ZFCP):
     def parse(self, args):
         retval = commands.zfcp.FC3_ZFCP.parse(self, args)
         for fcp in self.zfcp:
-            self.handler.id.zfcp.addFCP(fcp.devnum, fcp.wwpn, fcp.fcplun)
+            try:
+                self.handler.id.zfcp.addFCP(fcp.devnum, fcp.wwpn, fcp.fcplun)
+            except ValueError, e:
+                log.warning(str(e))
 
         isys.flushDriveDict()
         return retval
diff --git a/storage/zfcp.py b/storage/zfcp.py
index 2584268..4606bb3 100644
--- a/storage/zfcp.py
+++ b/storage/zfcp.py
@@ -212,7 +212,7 @@ class ZFCP:
             try:
                 self.addFCP(devnum, wwpn, fcplun)
             except ValueError, e:
-                log.warn("Invalid FCP device configuration: %s" %(e,))
+                log.warn(str(e))
                 continue
 
     def addFCP(self, devnum, wwpn, fcplun):
@@ -224,7 +224,10 @@ class ZFCP:
         if len(self.fcpdevs) == 0:
             return
         for d in self.fcpdevs:
-            d.offlineDevice()
+            try:
+                d.offlineDevice()
+            except ValueError, e:
+                log.warn(str(e))
 
     def startup(self):
         if not self.hasReadConfig:
@@ -234,7 +237,10 @@ class ZFCP:
         if len(self.fcpdevs) == 0:
             return
         for d in self.fcpdevs:
-            d.onlineDevice()
+            try:
+                d.onlineDevice()
+            except ValueError, e:
+                log.warn(str(e))
 
     def writeKS(self, f):
         if len(self.fcpdevs) == 0:
diff --git a/textw/partition_text.py b/textw/partition_text.py
index f14a273..412a7d7 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -211,7 +211,10 @@ class PartitionTypeWindow:
         devnum = entries[0].strip()
         wwpn = entries[1].strip()
         fcplun = entries[2].strip()
-        self.anaconda.id.storage.zfcp.addFCP(devnum, wwpn, fcplun)
+        try:
+            self.anaconda.id.storage.zfcp.addFCP(devnum, wwpn, fcplun)
+        except ValueError, e:
+            log.warn(str(e)) # alternatively popup error dialog instead
                                         
         return INSTALL_OK
 
-- 
1.6.3.1


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux