git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bff9875
)
guard AuthCheck with try/except as it will raise an exception.
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Mon, 6 Apr 2009 10:18:22 +0000
(10:18 +0000)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Mon, 6 Apr 2009 10:18:22 +0000
(10:18 +0000)
plcapi.py
patch
|
blob
|
history
diff --git
a/plcapi.py
b/plcapi.py
index
e38b0a5
..
03a9ca7
100644
(file)
--- 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: