[node-patches] Change in ovirt-node[master]: don't show invalid popup when kdump fields are empty

mburns at redhat.com mburns at redhat.com
Fri Oct 19 15:35:38 UTC 2012


Michael Burns has uploaded a new change for review.

Change subject: don't show invalid popup when kdump fields are empty
......................................................................

don't show invalid popup when kdump fields are empty

Previously, activating and then leaving a field without any
input would cause a popup saying "Invalid Entry".  Now, if the
field is empty, we won't show the error.

rhbz#867832

Change-Id: I22dd6c2d9db342b42c255c046285965c05ba1702
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M scripts/ovirt-config-setup.py
1 file changed, 16 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/79/8679/1

diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index 1180bf2..6a47751 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -574,13 +574,14 @@
         self.kdump_ssh_config.setFlags(_snack.FLAG_DISABLED, _snack.FLAGS_SET)
 
     def kdump_valid_nfs_callback(self):
-        if not is_valid_nfs(self.kdump_nfs_config.value()):
-            self._create_warn_screen()
-            ButtonChoiceWindow(self.screen, "Configuration Check",
-                               "Invalid NFS Entry", buttons=['Ok'])
-            self.reset_screen_colors()
-            self.kdump_nfs_config.set("")
-            self.gridform.draw()
+        if not self.kdump_nfs_config.value() is None:
+            if not is_valid_nfs(self.kdump_nfs_config.value()):
+                self._create_warn_screen()
+                ButtonChoiceWindow(self.screen, "Configuration Check",
+                                   "Invalid NFS Entry", buttons=['Ok'])
+                self.reset_screen_colors()
+                self.kdump_nfs_config.set("")
+                self.gridform.draw()
 
     def kdump_ssh_callback(self):
         self.kdump_nfs_type.setValue(" 0")
@@ -590,13 +591,14 @@
                                        _snack.FLAGS_RESET)
 
     def kdump_valid_ssh_callback(self):
-        if not is_valid_user_host(self.kdump_ssh_config.value()):
-            self._create_warn_screen()
-            ButtonChoiceWindow(self.screen, "Configuration Check",
-                               "Invalid SSH Entry", buttons=['Ok'])
-            self.reset_screen_colors()
-            self.kdump_ssh_config.set("")
-            self.gridform.draw()
+        if not self.kdump_nfs_config.value() is None:
+            if not is_valid_user_host(self.kdump_ssh_config.value()):
+                self._create_warn_screen()
+                ButtonChoiceWindow(self.screen, "Configuration Check",
+                                "Invalid SSH Entry", buttons=['Ok'])
+                self.reset_screen_colors()
+                self.kdump_ssh_config.set("")
+                self.gridform.draw()
 
     def kdump_restore_callback(self):
         self.kdump_ssh_type.setValue(" 0")


--
To view, visit http://gerrit.ovirt.org/8679
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22dd6c2d9db342b42c255c046285965c05ba1702
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>



More information about the node-patches mailing list