mirror of
https://github.com/python/cpython.git
synced 2025-09-28 11:15:17 +00:00
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).
This commit is contained in:
parent
9e586c2b35
commit
883456833c
1 changed files with 7 additions and 6 deletions
|
@ -415,12 +415,13 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
# join it with the saved CWD so it ends up where the user expects.
|
# join it with the saved CWD so it ends up where the user expects.
|
||||||
testdir = os.path.join(support.SAVEDCWD, a)
|
testdir = os.path.join(support.SAVEDCWD, a)
|
||||||
elif o == '--timeout':
|
elif o == '--timeout':
|
||||||
if not hasattr(faulthandler, 'dump_tracebacks_later'):
|
if hasattr(faulthandler, 'dump_tracebacks_later'):
|
||||||
print("The timeout option requires "
|
timeout = float(a)
|
||||||
"faulthandler.dump_tracebacks_later", file=sys.stderr)
|
if timeout <= 0:
|
||||||
sys.exit(1)
|
timeout = None
|
||||||
timeout = float(a)
|
else:
|
||||||
if timeout <= 0:
|
print("Warning: The timeout option requires "
|
||||||
|
"faulthandler.dump_tracebacks_later")
|
||||||
timeout = None
|
timeout = None
|
||||||
elif o == '--wait':
|
elif o == '--wait':
|
||||||
input("Press any key to continue...")
|
input("Press any key to continue...")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue