]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update error message in _zoneinfo.py to use f-string (GH-20577)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 3 Jun 2020 15:09:49 +0000 (08:09 -0700)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2020 15:09:49 +0000 (08:09 -0700)
Inline with the rest of the file, updated error message to use f-string.
(cherry picked from commit 5b9fbbabacca0378755fd9cadc4a7cc01a71eaef)

Co-authored-by: aboddie <64019758+aboddie@users.noreply.github.com>
Lib/zoneinfo/_zoneinfo.py

index 7b1718a0676e1786b0859282940ba1fb568a8651..9810637d3ef65eecb617c8fc86526d8dcb9a5094 100644 (file)
@@ -742,7 +742,7 @@ def _parse_tz_delta(tz_delta):
 
     if not -86400 < total < 86400:
         raise ValueError(
-            "Offset must be strictly between -24h and +24h:" + tz_delta
+            f"Offset must be strictly between -24h and +24h: {tz_delta}"
         )
 
     # Yes, +5 maps to an offset of -5h