Skip to content

Commit cfee2df

Browse files
committed
[utils] PEP 8
1 parent 30a3a4c commit cfee2df

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

youtube_dl/utils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,7 +2908,7 @@ def redirect_request(self, req, fp, code, msg, headers, newurl):
29082908
"""
29092909
m = req.get_method()
29102910
if (not (code in (301, 302, 303, 307, 308) and m in ("GET", "HEAD")
2911-
or code in (301, 302, 303) and m == "POST")):
2911+
or code in (301, 302, 303) and m == "POST")):
29122912
raise compat_HTTPError(req.full_url, code, msg, headers, fp)
29132913
# Strictly (according to RFC 2616), 301 or 302 in response to
29142914
# a POST MUST NOT cause a redirection without confirmation
@@ -2930,11 +2930,10 @@ def redirect_request(self, req, fp, code, msg, headers, newurl):
29302930
CONTENT_HEADERS = ("content-length", "content-type")
29312931
# NB: don't use dict comprehension for python 2.6 compatibility
29322932
newheaders = dict((k, v) for k, v in req.headers.items()
2933-
if k.lower() not in CONTENT_HEADERS)
2934-
return compat_urllib_request.Request(newurl,
2935-
headers=newheaders,
2936-
origin_req_host=req.origin_req_host,
2937-
unverifiable=True)
2933+
if k.lower() not in CONTENT_HEADERS)
2934+
return compat_urllib_request.Request(
2935+
newurl, headers=newheaders, origin_req_host=req.origin_req_host,
2936+
unverifiable=True)
29382937

29392938

29402939
def extract_timezone(date_str):

0 commit comments

Comments
 (0)