From ccb8e338e1772778ea871e02e4b0b0f90ee2a234 Mon Sep 17 00:00:00 2001 From: Kirill Vasin Date: Tue, 18 Jun 2019 19:11:49 +0300 Subject: [PATCH] added custom KeyboardInterrupt support --- dvc/stage.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dvc/stage.py b/dvc/stage.py index 93831657e..3f7290f33 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -774,7 +774,11 @@ class Stage(object): env=fix_env(os.environ), executable=executable, ) - p.communicate() + + try: + p.communicate() + except KeyboardInterrupt: + p.communicate() if p.returncode != 0: raise StageCmdFailedError(self)