[amazonstorecard] Break login loop after several retries. Closes #2042
This commit is contained in:
parent
337b827802
commit
16329612fe
1 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,9 @@ class AmazonStoreCard(LoginBrowser):
|
||||||
def do_login(self):
|
def do_login(self):
|
||||||
self.session.cookies.clear()
|
self.session.cookies.clear()
|
||||||
self.login.go()
|
self.login.go()
|
||||||
while self.login.is_here():
|
for i in xrange(self.MAX_RETRIES):
|
||||||
|
if not self.login.is_here():
|
||||||
|
break
|
||||||
self.page.proceed(self.config)
|
self.page.proceed(self.config)
|
||||||
if not self.page.logged:
|
if not self.page.logged:
|
||||||
raise BrowserIncorrectPassword()
|
raise BrowserIncorrectPassword()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue