mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Tolerate urllib3.response.HTTPResponse.msg being None
This commit is contained in:
committed by
Kevin McCarthy
parent
64d6811eda
commit
ac20cd1dd3
@@ -47,8 +47,9 @@ def parse_headers(header_list):
|
||||
|
||||
|
||||
def serialize_headers(response):
|
||||
headers = response.headers if response.msg is None else response.msg
|
||||
out = {}
|
||||
for key, values in compat.get_headers(response.msg):
|
||||
for key, values in compat.get_headers(headers):
|
||||
out.setdefault(key, [])
|
||||
out[key].extend(values)
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user