]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
explicitly set UnsupportedOperation's module rather than relying on incorrect globals...
authorBenjamin Peterson <benjamin@python.org>
Tue, 8 May 2012 02:19:42 +0000 (22:19 -0400)
committerBenjamin Peterson <benjamin@python.org>
Tue, 8 May 2012 02:19:42 +0000 (22:19 -0400)
Lib/io.py

index 87fab92ba7b997cf9bab4fba0a99a5969281e3b0..6c7cec968c592447dc5cc695203bdaf3a9f41044 100644 (file)
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -67,6 +67,9 @@ from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
 
 OpenWrapper = _io.open # for compatibility with _pyio
 
+# Pretend this exception was created here.
+UnsupportedOperation.__module__ = "io"
+
 # for seek()
 SEEK_SET = 0
 SEEK_CUR = 1