expects the 'interfaces' key in GetSlivers - review logs to always mention module
[nodemanager.git] / plcapi.py
index 2ef5dc1..a2d31cb 100644 (file)
--- a/plcapi.py
+++ b/plcapi.py
@@ -1,4 +1,5 @@
 # $Id$
+# $URL$
 
 import safexmlrpc
 import hmac, sha
@@ -50,8 +51,13 @@ class PLCAPI:
 
         
     def check_authentication(self):
-        # just a simple call to check authentication
-        return self.AuthCheck(self)
+        authstatus = False
+        if self.key or self.session:
+            try: 
+                authstatus = self.AuthCheck()
+            except: 
+                logger.log_exc("plcapi: failed in plcapi.check_authentication")
+        return authstatus
 
 
     def add_auth(self, function):