]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] io: Add missing f (#96701)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Fri, 9 Sep 2022 09:28:26 +0000 (02:28 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Sep 2022 09:28:26 +0000 (10:28 +0100)
Lib/io.py
Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst [new file with mode: 0644]

index a205e00575f7e87df830a88c78189d8075977bad..a4186499c647153ca909f576870d885059488cfc 100644 (file)
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -70,7 +70,7 @@ def __getattr__(name):
         global OpenWrapper
         OpenWrapper = open
         return OpenWrapper
-    raise AttributeError("module {__name__!r} has no attribute {name!r}")
+    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
 
 
 # Pretend this exception was created here.
diff --git a/Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst b/Misc/NEWS.d/next/Library/2022-09-08-23-23-24.gh-issue-96700.J0MQGK.rst
new file mode 100644 (file)
index 0000000..5218f98
--- /dev/null
@@ -0,0 +1 @@
+Fix incorrect error message in the :mod:`io` module.