diff options
author | emkael <emkael@tlen.pl> | 2021-09-28 01:46:40 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2021-09-28 01:46:40 +0200 |
commit | 592105b9ee6a9c6f3d9bd7358bc5ab18f8ded0c8 (patch) | |
tree | bac2e64e4692bfc62940ba6ca18e02f72740b9b3 /jfr_playoff/remote.py | |
parent | 6f11a6a00cdc7f96b91ded3ff313eabc57cc9f83 (diff) |
Print detected content encoding info only if it's actually been detected
Diffstat (limited to 'jfr_playoff/remote.py')
-rw-r--r-- | jfr_playoff/remote.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jfr_playoff/remote.py b/jfr_playoff/remote.py index b918ea1..8f6f78f 100644 --- a/jfr_playoff/remote.py +++ b/jfr_playoff/remote.py @@ -18,10 +18,10 @@ class RemoteUrl: encoding_match = re.search( 'content=".*;( )?charset=(.*?)"', request.content, re.IGNORECASE) - PlayoffLogger.get('remote').debug( - 'Content encoding: %s', - encoding_match.group(2)) if encoding_match: + PlayoffLogger.get('remote').debug( + 'Content encoding: %s', + encoding_match.group(2)) request.encoding = encoding_match.group(2) cls.url_cache[url] = request.text PlayoffLogger.get('remote').info( |