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

[PATCH 2/2] Set custom_icon to error for advanced storage dialog errors



Also change the no initator set error dialog title from "Error with data"
to just "Error" to be consistent with the other error dialog titles.
---
 iw/autopart_type.py |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index f07bccd..730884d 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -284,7 +284,8 @@ class PartitionTypeWindow(InstallWindow):
             initiator.strip()
             if len(initiator) == 0:
                 self.intf.messageWindow(_("Invalid Initiator Name"),
-                                        _("You must provide an initiator name."))
+                                        _("You must provide an initiator name."),
+                                        custom_icon="error")
                 continue
 
             self.storage.iscsi.initiator = initiator
@@ -317,17 +318,20 @@ class PartitionTypeWindow(InstallWindow):
             except network.IPError, msg:
                 err = msg
             if err:
-                self.intf.messageWindow(_("Error with Data"), "%s" %(err,))
+                self.intf.messageWindow(_("Error"), str(err),
+                                        custom_icon="error")
                 continue
 
             try:
                 self.storage.iscsi.addTarget(ip, port, user, pw,
                                              user_in, pw_in, self.intf)
             except ValueError, e:
-                self.intf.messageWindow(_("Error"), str(e))
+                self.intf.messageWindow(_("Error"), str(e),
+                                        custom_icon="error")
                 continue
             except IOError, e:
-                self.intf.messageWindow(_("Error"), str(e))
+                self.intf.messageWindow(_("Error"), str(e),
+                                        custom_icon="error")
                 rc = gtk.RESPONSE_CANCEL
             break
 
@@ -402,7 +406,8 @@ class PartitionTypeWindow(InstallWindow):
             try:
                 self.storage.fcoe.addSan(store.get_value(iter, 1), self.intf)
             except IOError, e:
-                self.intf.messageWindow(_("Error"), str(e))
+                self.intf.messageWindow(_("Error"), str(e),
+                                        custom_icon="error")
                 rc = gtk.RESPONSE_CANCEL
 
             break
@@ -431,7 +436,8 @@ class PartitionTypeWindow(InstallWindow):
             try:
                 self.storage.zfcp.addFCP(devnum, wwpn, fcplun)
             except ValueError, e:
-                self.intf.messageWindow(_("Error"), str(e))
+                self.intf.messageWindow(_("Error"), str(e),
+                                        custom_icon="error")
                 continue
             break
 
-- 
1.6.5.2


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