]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #8407: write error message on sigwait test failure
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 10 Jun 2011 11:53:32 +0000 (13:53 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 10 Jun 2011 11:53:32 +0000 (13:53 +0200)
Lib/test/test_signal.py

index ea4062732d7551c0ab6bc66b8732b1e69e1cffd0..7a170432f28e5e9c6630271fdc0a758cb709b139 100644 (file)
@@ -619,10 +619,11 @@ class PendingSignalsTests(unittest.TestCase):
                     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