diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2015-02-07 13:27:50 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2015-02-07 13:27:50 (GMT) |
commit | 6e6c59b5085668f6047eb91bd671747b13fa36d1 (patch) | |
tree | 8f1c506e399e201d40f8009a081039a071f875aa /Lib/test/test_signal.py | |
parent | d005090e01b46f00494f9f268b4c8dc2b28ffe2c (diff) | |
download | cpython-6e6c59b5085668f6047eb91bd671747b13fa36d1.zip cpython-6e6c59b5085668f6047eb91bd671747b13fa36d1.tar.gz cpython-6e6c59b5085668f6047eb91bd671747b13fa36d1.tar.bz2 |
Issue #23285: PEP 475 -- Retry system calls failing with EINTR.
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r-- | Lib/test/test_signal.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 8f3dde4..774fc80 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -587,7 +587,7 @@ class SiginterruptTest(unittest.TestCase): r, w = os.pipe() def handler(signum, frame): - pass + 1 / 0 signal.signal(signal.SIGALRM, handler) if interrupt is not None: @@ -604,9 +604,8 @@ class SiginterruptTest(unittest.TestCase): try: # blocking call: read from a pipe without data os.read(r, 1) - except OSError as err: - if err.errno != errno.EINTR: - raise + except ZeroDivisionError: + pass else: sys.exit(2) sys.exit(3) |