cosmetic: protect drl against void getslivers
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 2 Jun 2010 10:01:22 +0000 (10:01 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 2 Jun 2010 10:01:22 +0000 (10:01 +0000)
nodemanager.py
plugins/drl.py

index 0cf1dc6..ee328c9 100755 (executable)
@@ -188,8 +188,6 @@ def run():
         logger.log("nodemanager: Checking Auth.")
         while plc.check_authentication() != True:
             try:
-#                import pdb
-#               pdb.set_trace()
                 plc.update_session()
                 logger.log("nodemanager: Authentication Failure. Retrying")
             except Exception,e:
index 65eb0f6..a82ca78 100644 (file)
@@ -66,6 +66,10 @@ def GetSlivers(data, conf = None, plc = None):
        HAVE_DRL = 0
        node_id = tools.node_id()
 
+       if 'slivers' not in data:
+               logger.log_missing_data("drl.GetSlivers",'slivers')
+               return
+
        for sliver in data['slivers']:
                for attribute in sliver['attributes']:
                        tag = attribute['tagname']