aboutsummaryrefslogtreecommitdiff
path: root/h-client/hlibrary.py
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-04-11 23:40:41 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-04-11 23:40:41 +0000
commit9fb4924d5aa544bc51b3f5811772485fe865ca81 (patch)
tree016807b1291a2f3e6a228b0f97b80e5d521ff7ba /h-client/hlibrary.py
parente4ef6b116b273362c521854cc517bb1c5b8b0cd7 (diff)
h-client:implemented big icons
Diffstat (limited to 'h-client/hlibrary.py')
-rw-r--r--h-client/hlibrary.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/h-client/hlibrary.py b/h-client/hlibrary.py
index c3ade68..cc25edc 100644
--- a/h-client/hlibrary.py
+++ b/h-client/hlibrary.py
@@ -432,12 +432,10 @@ class Client:
result = self.request.perform('users/login/en')
self.request.setPost(None)
if result:
- result_login = self.isLogged()
- if result_login != -2:
- if result_login:
- return True
- else:
- self.errors.append("wrong username or password")
+ if self.isLogged():
+ return True
+ else:
+ self.errors.append("wrong username or password")
else:
self.errors.append("unable to connect to server")
@@ -474,7 +472,7 @@ class Client:
return {'status':status,'username':username,'token':token,'groups':groups}
except:
self.errors.append("the server is not up-to-date: unable to parse the xml database")
- return -2
+ return False
else:
self.errors.append("unable to connect to server")
return False
@@ -484,12 +482,9 @@ class Client:
info = self.getUserInfo()
if info != False:
- if info != -2:
- if info['status'] == 'logged':
- return True
- else:
- return -2
-
+ if info['status'] == 'logged':
+ return True
+
return False
#return the license info