From 1de644cd62b87fb64185b2935f57326984fc05ac Mon Sep 17 00:00:00 2001 From: JanLJL Date: Tue, 20 Apr 2021 13:59:56 +0200 Subject: [PATCH] fixed incompatibilty to py3.6 --- osaca/frontend.py | 6 +++--- osaca/semantics/kernel_dg.py | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/osaca/frontend.py b/osaca/frontend.py index 65ca702..fa6b014 100755 --- a/osaca/frontend.py +++ b/osaca/frontend.py @@ -351,9 +351,9 @@ class Frontend(object): lcd_text = ( "-------------------------------- WARNING: LCD analysis timed out " "-------------------------------\n While searching for all dependency chains" - " the analysis timed out.\n Decrease the number of instructions or set the " - "timeout threshold with --lcd-timeout.\n See --help for more " - "information.\n" + dashed_line + " the analysis timed out and might be\n incomplete. Decrease the number of " + "instructions or set the timeout threshold\n with --lcd-timeout. See --help" + " for more information.\n" + dashed_line ) warnings = "\n" warnings += lcd_text if lcd_warning else "" diff --git a/osaca/semantics/kernel_dg.py b/osaca/semantics/kernel_dg.py index 2bff2be..97c3a62 100755 --- a/osaca/semantics/kernel_dg.py +++ b/osaca/semantics/kernel_dg.py @@ -1,6 +1,8 @@ #!/usr/bin/env python3 import copy +import os +import signal import time from itertools import chain from multiprocessing import Manager, Process, cpu_count @@ -140,7 +142,9 @@ class KernelDG(nx.DiGraph): # terminate running processes for p in processes: if p.is_alive(): - p.kill() + # Python 3.6 does not support Process.kill(). + # Can be changed to `p.kill()` after EoL (01/22) of Py3.6 + os.kill(p.pid, signal.SIGKILL) p.join() all_paths = list(all_paths) else: