Issue #8407: write error message on sigwait test failure
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index ea40627..7a17043 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -619,10 +619,11 @@
print("the signal handler has been called",
file=sys.stderr)
os._exit(1)
-
- os._exit(0)
- finally:
+ except BaseException as err:
+ print("error: {}".format(err), file=sys.stderr)
os._exit(1)
+ else:
+ os._exit(0)
else:
# parent: let the child some time to wait, send him the signal, and
# check it correcty received it