handle Timeout exception as ReadTimeout has been introduced in recent versions of requests
This commit is contained in:
parent
00112b3e51
commit
e835e61d0a
1 changed files with 3 additions and 2 deletions
|
|
@ -18,12 +18,13 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from requests.exceptions import Timeout
|
||||
|
||||
from weboob.browser import LoginBrowser, URL, need_login
|
||||
from weboob.browser.exceptions import ServerError, HTTPNotFound
|
||||
from weboob.capabilities.base import Currency
|
||||
from weboob.capabilities.shop import OrderNotFound
|
||||
from weboob.exceptions import BrowserIncorrectPassword
|
||||
from requests.exceptions import ReadTimeout
|
||||
|
||||
from .pages import HomePage, LoginPage, AmazonPage, HistoryPage, \
|
||||
OrderOldPage, OrderNewPage
|
||||
|
|
@ -108,6 +109,6 @@ class Amazon(LoginBrowser):
|
|||
for i in xrange(self.MAX_RETRIES):
|
||||
try:
|
||||
return super(Amazon, self).location(*args, **kwargs)
|
||||
except (ServerError, ReadTimeout) as e:
|
||||
except (ServerError, Timeout) as e:
|
||||
pass
|
||||
raise e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue