Changeset: ac83e2c5ae53 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac83e2c5ae53
Modified Files:
        testing/Mtest.py.in
Branch: Nov2019
Log Message:

Use try/finally instead of except+raise.


diffs (23 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1750,15 +1750,13 @@ def GetBitsAndModsAndThreads(env) :
             proc.wait()
             qOut = sOut + qOut
             qErr = sErr + qErr
+    finally:
         t.cancel()
+        if proc.returncode is None:
+            killProc(proc, proc.stderr, cmd)
+            proc.wait()
         if procdebug:
             print('GetBitsAndModsAndThreads: process exited "%s" (%s)\n' % ('" 
"'.join(cmd), proc.returncode))
-    except KeyboardInterrupt:
-        t.cancel()
-        killProc(proc, proc.stderr, cmd)
-        if procdebug:
-            print('GetBitsAndModsAndThreads: process killed "%s"\n' % '" 
"'.join(cmd))
-        raise
     env['TST_MODS'] = []
     env['TST_BITS'] = ""
     env['TST_INT128'] = ""
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to