[Python-checkins] cpython: Issue #12250: regrtest --timeout displays a warning instead of failing with an
victor.stinner
python-checkins at python.org
Mon Jun 6 12:14:30 CEST 2011
http://hg.python.org/cpython/rev/7ffc5ececcb3
changeset: 70658:7ffc5ececcb3
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon Jun 06 12:14:23 2011 +0200
summary:
Issue #12250: regrtest --timeout displays a warning instead of failing with an
error if faulthandler.dump_tracebacks_later() is missing (e.g. if Python is
compiled without threads).
files:
Lib/test/regrtest.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -415,12 +415,13 @@
# join it with the saved CWD so it ends up where the user expects.
testdir = os.path.join(support.SAVEDCWD, a)
elif o == '--timeout':
- if not hasattr(faulthandler, 'dump_tracebacks_later'):
- print("The timeout option requires "
- "faulthandler.dump_tracebacks_later", file=sys.stderr)
- sys.exit(1)
- timeout = float(a)
- if timeout <= 0:
+ if hasattr(faulthandler, 'dump_tracebacks_later'):
+ timeout = float(a)
+ if timeout <= 0:
+ timeout = None
+ else:
+ print("Warning: The timeout option requires "
+ "faulthandler.dump_tracebacks_later")
timeout = None
elif o == '--wait':
input("Press any key to continue...")
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list