handle AttributeError instead of disabling sfa plugin
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Mon, 11 Oct 2010 21:02:55 +0000 (17:02 -0400)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Mon, 11 Oct 2010 21:02:55 +0000 (17:02 -0400)
plugins/sfagids.py

index 7c16a54..81c7b1e 100644 (file)
@@ -27,14 +27,15 @@ except:
     sfa = None
 
 def start():
-    #FIXME: disabled by caglar 
-    return
     logger.log("sfagid: plugin starting up ...")
     if not sfa:
         return
     keyfile, certfile = get_keypair(None)
     api = ComponentAPI(key_file=keyfile, cert_file=certfile)
-    api.get_node_key()
+    try:
+        api.get_node_key()
+    except AttributeError:
+        return
 
 def GetSlivers(data, config=None, plc=None):
     if not sfa: