diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2011-08-29 07:37:07 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2011-08-29 07:37:07 (GMT) |
commit | 66e53c70d79dc4ddff8066f2351cd7e085c1a16b (patch) | |
tree | 68a6f3e7907c680e91e56800ca8b85dbda39ed00 /Lib/trace.py | |
parent | 605ee2406f68c3d9fe0f88108394b93cb1458e62 (diff) | |
download | cpython-66e53c70d79dc4ddff8066f2351cd7e085c1a16b.zip cpython-66e53c70d79dc4ddff8066f2351cd7e085c1a16b.tar.gz cpython-66e53c70d79dc4ddff8066f2351cd7e085c1a16b.tar.bz2 |
Fix test failures when Python is compiled without thread support.
Diffstat (limited to 'Lib/trace.py')
-rw-r--r-- | Lib/trace.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/trace.py b/Lib/trace.py index 6e15e8b..38a13e2 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -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 = {} |