From 613af038351623bee6040581769b3ea9fc90f38a Mon Sep 17 00:00:00 2001 From: retornam Date: Mon, 1 Apr 2013 11:14:59 -0700 Subject: [PATCH] Updating requests from 0.11.1 to 1.2.0, setting max_retries in page.py since config is no longer used in requests.get --- pages/page.py | 5 +++-- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/page.py b/pages/page.py index 85b15f6c..10bacff2 100644 --- a/pages/page.py +++ b/pages/page.py @@ -112,9 +112,10 @@ def wait_for_ajax(self): def get_response_code(self, url): # return the response status - requests_config = {'max_retries': 5} + #this sets max_retries to 5 + requests.adapters.DEFAULT_RETRIES = 5 try: - r = requests.get(url, verify=False, allow_redirects=True, config=requests_config, timeout=self.timeout) + r = requests.get(url, verify=False, allow_redirects=True, timeout=self.timeout) return r.status_code except Timeout: return 408 diff --git a/requirements.txt b/requirements.txt index e96903cb..623df7ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,6 @@ py==1.4.8 pytest==2.2.4 pytest-mozwebqa==1.0 pytest-xdist==1.8 -requests==0.11.1 +requests==1.2.0 selenium wsgiref==0.1.2 \ No newline at end of file