"""
def __init__(self, uri, cacert, auth, timeout = 90, **kwds):
"""
def __init__(self, uri, cacert, auth, timeout = 90, **kwds):
open("/etc/planetlab/session", 'w').write(plc.GetSession().strip())
self.session = open("/etc/planetlab/session").read().strip()
open("/etc/planetlab/session", 'w').write(plc.GetSession().strip())
self.session = open("/etc/planetlab/session").read().strip()
- # 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