mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Fix test failures when Python is compiled without thread support.
This commit is contained in:
parent
605ee2406f
commit
66e53c70d7
1 changed files with 1 additions and 9 deletions
10
Lib/trace.py
10
Lib/trace.py
|
@ -502,15 +502,7 @@ class Trace:
|
||||||
def run(self, cmd):
|
def run(self, cmd):
|
||||||
import __main__
|
import __main__
|
||||||
dict = __main__.__dict__
|
dict = __main__.__dict__
|
||||||
if not self.donothing:
|
self.runctx(cmd, dict, dict)
|
||||||
threading.settrace(self.globaltrace)
|
|
||||||
sys.settrace(self.globaltrace)
|
|
||||||
try:
|
|
||||||
exec cmd in dict, dict
|
|
||||||
finally:
|
|
||||||
if not self.donothing:
|
|
||||||
sys.settrace(None)
|
|
||||||
threading.settrace(None)
|
|
||||||
|
|
||||||
def runctx(self, cmd, globals=None, locals=None):
|
def runctx(self, cmd, globals=None, locals=None):
|
||||||
if globals is None: globals = {}
|
if globals is None: globals = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue