commit | 9525a18b5bb317d9fb206c992ab62aa41559b0c8 | [log] [tgz] |
---|---|---|
author | Inada Naoki <songofacandy@gmail.com> | Fri Feb 26 11:09:06 2021 +0900 |
committer | GitHub <noreply@github.com> | Fri Feb 26 11:09:06 2021 +0900 |
tree | 6371d92749bdafd9fbc63493a6ef8cb6b08083f8 | |
parent | 3150754f91fc1d15e3888e22c065672838a9c069 [diff] [blame] |
bpo-43316: gzip: Fix sys.exit() usage. (GH-24652)
diff --git a/Lib/gzip.py b/Lib/gzip.py index 8002b43..ee0cbed 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py
@@ -583,7 +583,7 @@ def main(): g = sys.stdout.buffer else: if arg[-3:] != ".gz": - sys.exit("filename doesn't end in .gz:", repr(arg)) + sys.exit(f"filename doesn't end in .gz: {arg!r}") f = open(arg, "rb") g = builtins.open(arg[:-3], "wb") else: