From: Benjamin Peterson Date: Tue, 8 May 2012 02:19:42 +0000 (-0400) Subject: explicitly set UnsupportedOperation's module rather than relying on incorrect globals... X-Git-Tag: v3.3.0a4~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbf83933c5c6e8d5d171c11fb1c8feeeb825bcf3;p=thirdparty%2FPython%2Fcpython.git explicitly set UnsupportedOperation's module rather than relying on incorrect globals on startup (closes #14745) --- diff --git a/Lib/io.py b/Lib/io.py index 87fab92ba7b9..6c7cec968c59 100644 --- 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