[Python-checkins] cpython (2.7): Fix test failures when Python is compiled without thread support.
nadeem.vawda
python-checkins at python.org
Mon Aug 29 10:12:05 CEST 2011
http://hg.python.org/cpython/rev/bb7b14dd5ded
changeset: 72118:bb7b14dd5ded
branch: 2.7
parent: 72114:31b18a0242ca
user: Nadeem Vawda <nadeem.vawda at gmail.com>
date: Mon Aug 29 09:37:07 2011 +0200
summary:
Fix test failures when Python is compiled without thread support.
files:
Lib/trace.py | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/Lib/trace.py b/Lib/trace.py
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -502,15 +502,7 @@
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 = {}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list