From 36928d897ca44b0a62ebcb1c3fb358cbfd07440f Mon Sep 17 00:00:00 2001 From: Joakim Uddholm Date: Tue, 14 Jun 2016 15:40:20 +0200 Subject: [PATCH] is_gzipped: improved readability --- scrapy/utils/gz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/utils/gz.py b/scrapy/utils/gz.py index f2a9555b1..cfb652143 100644 --- a/scrapy/utils/gz.py +++ b/scrapy/utils/gz.py @@ -55,4 +55,4 @@ _is_gzipped_re = re.compile(br'^application/(x-)?gzip\b', re.I) def is_gzipped(response): """Return True if the response is gzipped, or False otherwise""" ctype = response.headers.get('Content-Type', b'') - return not _is_gzipped_re.search(ctype) is None + return _is_gzipped_re.search(ctype) is not None