diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-11 07:47:17 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-11 07:47:17 (GMT) |
commit | 647dac9d6fc08b9fad14c10dabe7cc8ee48c8553 (patch) | |
tree | 937bb716394673704e54f87227d4793739525813 | |
parent | 6da624098fab54b3f22c522806c74f352a8f6e5c (diff) | |
download | cpython-647dac9d6fc08b9fad14c10dabe7cc8ee48c8553.zip cpython-647dac9d6fc08b9fad14c10dabe7cc8ee48c8553.tar.gz cpython-647dac9d6fc08b9fad14c10dabe7cc8ee48c8553.tar.bz2 |
Close #25368: Fix test_eintr when Python is compiled without thread support
-rw-r--r-- | Lib/test/eintrdata/eintr_tester.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py index 443ccd5..9de2b6b 100644 --- a/Lib/test/eintrdata/eintr_tester.py +++ b/Lib/test/eintrdata/eintr_tester.py @@ -52,7 +52,8 @@ class EINTRBaseTest(unittest.TestCase): cls.signal_period) # Issue #25277: Use faulthandler to try to debug a hang on FreeBSD - faulthandler.dump_traceback_later(10 * 60, exit=True) + if hasattr(faulthandler, 'dump_traceback_later'): + faulthandler.dump_traceback_later(10 * 60, exit=True) @classmethod def stop_alarm(cls): @@ -62,7 +63,8 @@ class EINTRBaseTest(unittest.TestCase): def tearDownClass(cls): cls.stop_alarm() signal.signal(signal.SIGALRM, cls.orig_handler) - faulthandler.cancel_dump_traceback_later() + if hasattr(faulthandler, 'cancel_dump_traceback_later'): + faulthandler.cancel_dump_traceback_later() @classmethod def _sleep(cls): |