[node-patches] Change in ovirt-node[master]: plugins: Only disable SaveButton on ui_changes
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Tue Dec 11 20:09:42 UTC 2012
Fabian Deutsch has uploaded a new change for review.
Change subject: plugins: Only disable SaveButton on ui_changes
......................................................................
plugins: Only disable SaveButton on ui_changes
Change-Id: Ic38131deda75a8d77f40a4b6ca9452245d833729
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/plugins.py
1 file changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/63/9963/1
diff --git a/scripts/tui/src/ovirt/node/plugins.py b/scripts/tui/src/ovirt/node/plugins.py
index dbb113c..94f99d6 100644
--- a/scripts/tui/src/ovirt/node/plugins.py
+++ b/scripts/tui/src/ovirt/node/plugins.py
@@ -130,9 +130,7 @@
msg = e.message
# True and None are allowed values
if msg not in [True, None]:
- self.sig_valid.emit(False)
raise ovirt.node.exceptions.InvalidData(msg)
- self.sig_valid.emit(True)
return True
def ui_name(self):
@@ -224,12 +222,17 @@
self.logger.debug("Passing UI change to callback on_change: %s" % \
change)
- if self.validate_changes:
- self.validate(change)
- self.on_change(change)
+ try:
+ if self.validate_changes:
+ self.validate(change)
+ self.on_change(change)
+ except exceptions.InvalidData as e:
+ self.sig_valid.emit(False)
+ raise e
self.__changes.update(change)
self.logger.debug("Sum of all UI changes up to now: %s" % \
self.__changes)
+ self.sig_valid.emit(True)
return True
def _on_ui_save(self):
--
To view, visit http://gerrit.ovirt.org/9963
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic38131deda75a8d77f40a4b6ca9452245d833729
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list