X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=exec_utils.py;h=ae406ef41e925ddbd9ba5483ca1312b5686449e3;hb=532df2c5b57c7517dfb3dddd8c1358fbadf8baf3;hp=061370ff012a543c29f75f32b4996eaee3dbf0f8;hpb=971d4ba141459f78d10d5770b9459d1ead7d49a0;p=python_utils.git diff --git a/exec_utils.py b/exec_utils.py index 061370f..ae406ef 100644 --- a/exec_utils.py +++ b/exec_utils.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +# © Copyright 2021-2022, Scott Gasch + +"""Helper methods concerned with executing subprocesses.""" + import atexit import logging import os @@ -9,7 +13,6 @@ import subprocess import sys from typing import List, Optional - logger = logging.getLogger(__file__) @@ -138,7 +141,7 @@ def cmd_in_background(command: str, *, silent: bool = False) -> subprocess.Popen def kill_subproc() -> None: try: if subproc.poll() is None: - logger.info(f'At exit handler: killing {subproc} ({command})') + logger.info('At exit handler: killing %s (%s)', subproc, command) subproc.terminate() subproc.wait(timeout=10.0) except BaseException as be: