[node-patches] Change in ovirt-node[master]: Even if there are no changes, tell plugin

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Dec 11 20:09:32 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: Even if there are no changes, tell plugin
......................................................................

Even if there are no changes, tell plugin

Change-Id: If876bb1198a19eff44461c305ae504f025b80b05
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/plugins/__init__.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/68/9868/1

diff --git a/scripts/tui/src/ovirt/node/plugins/__init__.py b/scripts/tui/src/ovirt/node/plugins/__init__.py
index 0fb7c91..295bf9e 100644
--- a/scripts/tui/src/ovirt/node/plugins/__init__.py
+++ b/scripts/tui/src/ovirt/node/plugins/__init__.py
@@ -157,18 +157,17 @@
         Calls merge_changes, but only with values that really changed
         """
         LOGGER.debug("Request to apply model changes")
+        real_changes = {}
         if self._changes:
-            real_changes = {}
             for key, value in self._changes.items():
                 if value == self.model()[key]:
                     LOGGER.debug(("Skipping pseudo-change of '%s', value " + \
                                   "did not change") % key)
                 else:
                     real_changes[key] = value
-            return self.on_merge(real_changes)
         else:
             LOGGER.debug("No changes detected")
-        return True
+        return self.on_merge(real_changes)
 
 
 class Widget(object):
@@ -224,6 +223,7 @@
             self.__dict__["_%s" % name] = new_value
         return self.__dict__["_%s" % name]
 
+
 class InputWidget(Widget):
     signaling_properties = ["enabled"]
 
@@ -247,6 +247,7 @@
                                         lambda: value != None,
                                         value)
 
+
 class Header(Label):
     pass
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If876bb1198a19eff44461c305ae504f025b80b05
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