From b3e538f42ff62d8c828ffb3ce952d198aff556ee Mon Sep 17 00:00:00 2001 From: karajan1001 Date: Fri, 16 Dec 2022 10:48:48 +0800 Subject: [PATCH] Supress the error message when we kill the process. --- src/dvc_task/proc/process.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dvc_task/proc/process.py b/src/dvc_task/proc/process.py index 9b3c5da..dd36d05 100644 --- a/src/dvc_task/proc/process.py +++ b/src/dvc_task/proc/process.py @@ -196,6 +196,8 @@ def wait(self, timeout: Optional[int] = None) -> Optional[int]: self._proc.wait(timeout=timeout) except subprocess.TimeoutExpired as exc: raise TimeoutExpired(exc.cmd, exc.timeout) from exc + except KeyboardInterrupt: + pass self.returncode = self._proc.returncode self._close_fds() self._dump()