Francesco Romani has uploaded a new change for review.

Change subject: guest monitor: simplify getGuestName()
......................................................................

guest monitor: simplify getGuestName()

The get() method of the dictionaries has the same semantic
of the old method, but just one line of code.

Change-Id: I73e2fd6e6eb97cc51d28f70c8ade818fdc74e0be
Signed-off-by: Francesco Romani <[email protected]>
---
M mom/GuestMonitor.py
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/88/31588/1

diff --git a/mom/GuestMonitor.py b/mom/GuestMonitor.py
index bb8aa86..635203a 100644
--- a/mom/GuestMonitor.py
+++ b/mom/GuestMonitor.py
@@ -64,7 +64,4 @@
         Provide structured access to the guest name without calling hypervisor
         interface.
         """
-        try:
-            return self.properties['name']
-        except KeyError:
-            return None
+        return self.properties.get('name')


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73e2fd6e6eb97cc51d28f70c8ade818fdc74e0be
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to