From fbf629bac0cf0cdb25777a404e4debf0de1cd7fd Mon Sep 17 00:00:00 2001 From: Oleg Plakhotniuk Date: Thu, 26 Feb 2015 04:51:55 -0600 Subject: [PATCH] [amazon] Retry ConnectionError as well. Closes #1742 --- modules/amazon/browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/amazon/browser.py b/modules/amazon/browser.py index e7c2a5ba..653deecd 100644 --- a/modules/amazon/browser.py +++ b/modules/amazon/browser.py @@ -18,7 +18,7 @@ # along with weboob. If not, see . -from requests.exceptions import Timeout +from requests.exceptions import Timeout, ConnectionError from weboob.browser import LoginBrowser, URL, need_login from weboob.browser.exceptions import ServerError, HTTPNotFound @@ -108,6 +108,6 @@ class Amazon(LoginBrowser): for i in xrange(self.MAX_RETRIES): try: return super(Amazon, self).location(*args, **kwargs) - except (ServerError, Timeout) as e: + except (ServerError, Timeout, ConnectionError) as e: pass raise e