X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plcapi.py;h=03a9ca7af2bfe1c25fce346f7758df5863575d25;hb=c484e6e613a4016d33471b517bc6298ca5b997d0;hp=e38b0a5d697b84dcf546a84fdbadaa1001229b59;hpb=bff98752ba3aa13c0fb61874b5d444a84d5291d6;p=nodemanager.git diff --git a/plcapi.py b/plcapi.py index e38b0a5..03a9ca7 100644 --- a/plcapi.py +++ b/plcapi.py @@ -53,7 +53,10 @@ class PLCAPI: # just a simple call to check authentication def check(): if (self.node_id and self.key) or self.session: - if self.AuthCheck() == 1: return True + try: + if self.AuthCheck() == 1: return True + except: + return False return False if not check(): if self.node_id and self.key: