Browse files

mapmyfitness changes

  • Loading branch information...
1 parent 55a8b8f commit 3bd9470cc519958c75cd76854a6d18856942afa4 @mlt committed Feb 11, 2013
Showing with 1 addition and 9 deletions.
  1. +1 −9 src/web/mmf.py
View
10 src/web/mmf.py
@@ -60,16 +60,8 @@ def login(self):
_log.debug("Posting login credentials to MMF. username=%s", self.username)
url = "https://{:s}/auth/login/".format(self.url)
r = requests.post(url, data=payload, cookies=r.cookies)
- if 302 != r.status_code:
+ if 200 != r.status_code:
raise InvalidLogin()
- # verify we're logged in
- _log.debug("Checking if login was successful.")
- username = r.cookies['_cache_username']
- if username == "":
- self.login_invalid = True
- raise InvalidLogin()
- elif username != self.username:
- _log.warning("Username mismatch, probably OK, if upload fails check user/pass. %s != %s" % (username, self.username))
self.logged_in = True
self.cookies = r.cookies

0 comments on commit 3bd9470

Please sign in to comment.