Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 590a528

Browse files
Merge branch 'support-click-8.2' of github.com:s-t-e-v-e-n-k/softlayer-python into s-t-e-v-e-n-k-support-click-8.2
2 parents d92d20a + bf8bf3b commit 590a528

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SoftLayer/CLI/formatting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,10 @@ def confirm(prompt_str, default=False):
243243
default_str = 'n'
244244
prompt = '%s [y/N]' % prompt_str
245245

246-
ans = click.prompt(prompt, default=default_str, show_default=False)
246+
try:
247+
ans = click.prompt(prompt, default=default_str, show_default=False)
248+
except click.exceptions.Abort:
249+
return False
247250
if ans.lower() in ('y', 'yes', 'yeah', 'yup', 'yolo'):
248251
return True
249252

0 commit comments

Comments
 (0)