Fix test failures when Python is compiled without thread support.

This commit is contained in:
Nadeem Vawda 2011-08-29 09:37:07 +02:00
parent 605ee2406f
commit 66e53c70d7
1 changed files with 1 additions and 9 deletions

View File

@ -502,15 +502,7 @@ class Trace:
def run(self, cmd):
import __main__
dict = __main__.__dict__
if not self.donothing:
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)
self.runctx(cmd, dict, dict)
def runctx(self, cmd, globals=None, locals=None):
if globals is None: globals = {}