[node-patches] Change in ovirt-node[master]: ui: Minor optimiztaion

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Sep 19 10:06:22 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: ui: Minor optimiztaion
......................................................................

ui: Minor optimiztaion

Just sue get() instead of our custom stuff.

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/81/19381/1

diff --git a/src/ovirt/node/plugins.py b/src/ovirt/node/plugins.py
index de5cde6..f35fc63 100644
--- a/src/ovirt/node/plugins.py
+++ b/src/ovirt/node/plugins.py
@@ -434,9 +434,7 @@
     def __getitem__(self, key):
         """Diferent to a dict: We return none if a key does not exist
         """
-        if key in self:
-            return dict.__getitem__(self, key)
-        return None
+        return dict.get(self, key, None)
 
     def reset(self, changes):
         self.clear()


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

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