is_gzipped: improved readability

This commit is contained in:
Joakim Uddholm 2016-06-14 15:40:20 +02:00 committed by Paul Tremberth
parent 27cbcbcdaf
commit 658b6a6dcd
1 changed files with 1 additions and 1 deletions

View File

@ -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