Fix a feature that doesn't yet exist on python 2.6
This commit is contained in:
parent
1e3dacc43b
commit
8ae9105d6c
@ -165,9 +165,14 @@ def readurl(url, data=None, timeout=None, retries=0, sec_between=1,
|
|||||||
for i in range(0, manual_tries):
|
for i in range(0, manual_tries):
|
||||||
try:
|
try:
|
||||||
req_args['headers'] = headers_cb(url)
|
req_args['headers'] = headers_cb(url)
|
||||||
|
filtered_req_args = {}
|
||||||
|
for (k, v) in req_args.items():
|
||||||
|
if k == 'data':
|
||||||
|
continue
|
||||||
|
filtered_req_args[k] = v
|
||||||
|
|
||||||
LOG.debug("[%s/%s] open '%s' with %s configuration", i,
|
LOG.debug("[%s/%s] open '%s' with %s configuration", i,
|
||||||
manual_tries, url,
|
manual_tries, url, filtered_req_args)
|
||||||
{k: req_args[k] for k in req_args if k != 'data'})
|
|
||||||
|
|
||||||
r = requests.request(**req_args)
|
r = requests.request(**req_args)
|
||||||
if check_status:
|
if check_status:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user