Adding more verbose errors when login fails

This commit is contained in:
Aaron Cohen
2012-09-27 00:13:24 -07:00
parent f63924472d
commit eb16244e69
2 changed files with 29 additions and 30 deletions

View File

@@ -68,7 +68,7 @@ class GazelleAPI(object):
'password': self.password}
r = self.session.post(loginpage, data=data)
if r.status_code != 200:
raise LoginException
raise LoginException("Login error, http code %s" % r.status_code)
accountinfo = self.request('index')
self.userid = accountinfo['id']
self.authkey = accountinfo['authkey']