diff options
author | Stefan Krah <skrah@bytereef.org> | 2014-10-12 11:29:15 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2014-10-12 11:29:15 (GMT) |
commit | bca45ed0c8c25396531ff0645626c9a48801be5a (patch) | |
tree | 1e0c540549c35031f4d9e39407cc35603cd782b6 /Lib/_pydecimal.py | |
parent | e0c988ac7fcf430504211a8d289d491ae8c2957d (diff) | |
download | cpython-bca45ed0c8c25396531ff0645626c9a48801be5a.zip cpython-bca45ed0c8c25396531ff0645626c9a48801be5a.tar.gz cpython-bca45ed0c8c25396531ff0645626c9a48801be5a.tar.bz2 |
Issue #19232: Fix sys.modules lookup (--without-threads)
Diffstat (limited to 'Lib/_pydecimal.py')
-rw-r--r-- | Lib/_pydecimal.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py index fef8be6a..659e370 100644 --- a/Lib/_pydecimal.py +++ b/Lib/_pydecimal.py @@ -144,6 +144,7 @@ __all__ = [ 'HAVE_THREADS' ] +__xname__ = __name__ # sys.modules lookup (--without-threads) __name__ = 'decimal' # For pickling __version__ = '1.70' # Highest version of the spec this complies with # See http://speleotrove.com/decimal/ @@ -441,7 +442,7 @@ except ImportError: # Python was compiled without threads; create a mock object instead class MockThreading(object): def local(self, sys=sys): - return sys.modules[__name__] + return sys.modules[__xname__] threading = MockThreading() del MockThreading |