mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
cleanup
This commit is contained in:
+1
-4
@@ -30,12 +30,8 @@ def header_expand(headers):
|
||||
collector = []
|
||||
|
||||
if isinstance(headers, dict):
|
||||
|
||||
# Assume header-tuple
|
||||
headers = headers.items()
|
||||
|
||||
# print headers
|
||||
|
||||
for i, (value, params) in enumerate(headers):
|
||||
|
||||
_params = []
|
||||
@@ -55,6 +51,7 @@ def header_expand(headers):
|
||||
collector.append(', ')
|
||||
|
||||
|
||||
# Remove trailing seperators.
|
||||
if collector[-1] in (', ', '; '):
|
||||
del collector[-1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user