X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plcapi.py;h=be77171d9116b68b41b820b7ad7bead07c2cc2bc;hb=refs%2Fheads%2F1.8;hp=2ef5dc128594d91cea23dfc539ed8abdcba5db2e;hpb=7acb378c1b5448d23bd1eb0e6583a530604d0511;p=nodemanager.git diff --git a/plcapi.py b/plcapi.py index 2ef5dc1..be77171 100644 --- a/plcapi.py +++ b/plcapi.py @@ -50,8 +50,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() + return authstatus def add_auth(self, function):