detect when credentials are wrong

This commit is contained in:
Romain Bignon 2013-03-21 13:21:42 +01:00
commit d17dda5965

View file

@ -102,6 +102,9 @@ class Cragr(BaseBrowser):
# The result of POST is the destination URL.
url = self.page.get_result_url()
if not url.startswith('http'):
raise BrowserIncorrectPassword(url)
self.location(url)
if self.is_on_page(LoginErrorPage) or not self.is_logged():