From 9fb4924d5aa544bc51b3f5811772485fe865ca81 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 11 Apr 2011 23:40:41 +0000 Subject: h-client:implemented big icons --- h-client/hlibrary.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'h-client/hlibrary.py') 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 -- cgit v1.2.3