fixed incompatibilty to py3.6

This commit is contained in:
JanLJL
2021-04-20 13:59:56 +02:00
parent 3d1c6aae8d
commit 1de644cd62
2 changed files with 8 additions and 4 deletions

View File

@@ -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 ""

View File

@@ -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: