Skip to content

Commit 7fccbc6

Browse files
committed
Hande SIGINT/SIGTERM in diff command
1 parent 21eda43 commit 7fccbc6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

stacker/actions/diff.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
from . import build
99
from .. import exceptions
1010
from ..util import parse_cloudformation_template
11-
from ..status import NotSubmittedStatus, NotUpdatedStatus, COMPLETE
11+
from ..status import (
12+
NotSubmittedStatus,
13+
NotUpdatedStatus,
14+
COMPLETE,
15+
INTERRUPTED,
16+
)
1217

1318
logger = logging.getLogger(__name__)
1419

@@ -198,6 +203,9 @@ def _print_new_stack(self, stack, parameters):
198203

199204
def _diff_stack(self, stack, **kwargs):
200205
"""Handles the diffing a stack in CloudFormation vs our config"""
206+
if self.cancel.wait(0):
207+
return INTERRUPTED
208+
201209
if not build.should_submit(stack):
202210
return NotSubmittedStatus()
203211

0 commit comments

Comments
 (0)