added get method that returns dict with of pl_info and geni_info
authorTony Mack <tmack@cs.princeton.edu>
Wed, 11 Feb 2009 22:13:08 +0000 (22:13 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Wed, 11 Feb 2009 22:13:08 +0000 (22:13 +0000)
geni/util/record.py

index 086723d..56aafae 100644 (file)
@@ -279,7 +279,13 @@ class GeniRecord():
         print "    pl_info:"
         pl_info = getattr(self, "pl_info", {})
         if pl_info:
+
             for key in pl_info.keys():
                 print "       ", key, ":", pl_info[key]
 
 
+    def get(self):
+        info = {}
+        info.update(getattr(self, "geni_info", {}))
+        info.update(getattr(self, "pl_info", {}))
+        return info