Merge pull request #130 from kawaii-ghost/master

Fix deprecated stuff
This commit is contained in:
Alexey Avramov 2023-06-10 15:56:18 +09:00 committed by GitHub
commit ecf0ba7c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ from time import sleep, monotonic
from operator import itemgetter
from sys import stdout, stderr, argv, exit
from re import search
from sre_constants import error as invalid_re
from re import error as invalid_re
from signal import signal, SIGKILL, SIGTERM, SIGINT, SIGQUIT, SIGHUP, SIGUSR1
@ -209,7 +209,7 @@ def exe(cmd):
cmd_num_dict['cmd_num'] += 1
cmd_num = cmd_num_dict['cmd_num']
th_name = threading.current_thread().getName()
th_name = threading.current_thread().name
log('Executing Command-{} {} with timeout {}s in {}'.format(
cmd_num,
@ -237,11 +237,11 @@ def start_thread(func, *a, **k):
""" run function in a new thread
"""
th = threading.Thread(target=func, args=a, kwargs=k, daemon=True)
th_name = th.getName()
th_name = th.name
if debug_threading:
log('Starting {} from {}'.format(
th_name, threading.current_thread().getName()
th_name, threading.current_thread().name
))
try:
@ -350,7 +350,7 @@ def pop(cmd):
else:
wait_time = 30
th_name = threading.current_thread().getName()
th_name = threading.current_thread().name
log('Executing Command-{} {} with timeout {}s in {}'.format(
cmd_num,