From 6a36a1dae6d0b2b21d40b4ed7f835d73bb56c7fb Mon Sep 17 00:00:00 2001 From: Lauren Liberda Date: Fri, 28 May 2021 00:50:34 +0200 Subject: [PATCH] utils: flake8 --- haruhi_dl/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/haruhi_dl/utils.py b/haruhi_dl/utils.py index ce3d697b5..06b216898 100644 --- a/haruhi_dl/utils.py +++ b/haruhi_dl/utils.py @@ -2910,7 +2910,7 @@ class HaruhiDLRedirectHandler(compat_urllib_request.HTTPRedirectHandler): """ m = req.get_method() if (not (code in (301, 302, 303, 307, 308) and m in ("GET", "HEAD") - or code in (301, 302, 303) and m == "POST")): + or code in (301, 302, 303) and m == "POST")): raise compat_HTTPError(req.full_url, code, msg, headers, fp) # Strictly (according to RFC 2616), 301 or 302 in response to # a POST MUST NOT cause a redirection without confirmation @@ -2932,11 +2932,11 @@ class HaruhiDLRedirectHandler(compat_urllib_request.HTTPRedirectHandler): CONTENT_HEADERS = ("content-length", "content-type") # NB: don't use dict comprehension for python 2.6 compatibility newheaders = dict((k, v) for k, v in req.headers.items() - if k.lower() not in CONTENT_HEADERS) + if k.lower() not in CONTENT_HEADERS) return compat_urllib_request.Request(newurl, - headers=newheaders, - origin_req_host=req.origin_req_host, - unverifiable=True) + headers=newheaders, + origin_req_host=req.origin_req_host, + unverifiable=True) def extract_timezone(date_str):