From 525ce2984b4fa460a616946b7f1f992ea1df090f Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 6 Jul 2020 15:43:18 +0000 Subject: [PATCH] Fix log messages not getting formatted --- comments.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/comments.py b/comments.py index 00e480d..57681d2 100644 --- a/comments.py +++ b/comments.py @@ -57,7 +57,7 @@ class Comments(qwarc.Item): self.logger.error('Could not find session token') return if sessionToken.lstrip(b'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-') not in (b'', b'=', b'=='): - self.logger.error('Unexpected session token value: {sessionToken!r}') + self.logger.error(f'Unexpected session token value: {sessionToken!r}') return sessionToken = sessionToken.decode('ascii') @@ -72,12 +72,12 @@ class Comments(qwarc.Item): section = content[continuationStartPos:sectionIdentifierPos] continuationToken = qwarc.utils.str_get_between(section, b'"continuation":"', b'"') if continuationToken.lstrip(b'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-') not in (b'', b'=', b'=='): - self.logger.error('Unexpected continuation token value: {continuationToken!r}') + self.logger.error(f'Unexpected continuation token value: {continuationToken!r}') return continuationToken = continuationToken.decode('ascii') itct = qwarc.utils.str_get_between(section, b'"clickTrackingParams":"', b'"') if itct.lstrip(b'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-') not in (b'', b'=', b'=='): - self.logger.error('Unexpected itct value: {itct!r}') + self.logger.error(f'Unexpected itct value: {itct!r}') return itct = itct.decode('ascii')