Skip to content

Commit

Permalink
kill all threads not gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
grabin-dev committed Apr 1, 2020
1 parent b928a3a commit 5758987
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions demisto_sdk/commands/lint/lint_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,18 @@ def run_dev_packages(self, parallel: int, no_flake8: bool, no_bandit: bool, no_m
if pkg_status["pack_type"] not in pkgs_type:
pkgs_type.append(pkg_status["pack_type"])
except KeyboardInterrupt:
print_warning("Stop demisto-sdk lint - Due to 'Ctrl' + 'C' signal")
executor.shutdown()
print_warning("Stop demisto-sdk lint - Due to 'Ctrl C' signal")
try:
executor.shutdown(wait=False)
except Exception:
pass
return 1
except Exception as e:
executor.shutdown(wait=False)
print_error(f"Stop demisto-sdk lint - Due to the following exception: {e}")
print_warning(f"Stop demisto-sdk lint - Due to Exception {e}")
try:
executor.shutdown(wait=False)
except Exception:
pass
return 1

self._report_results(lint_status=lint_status,
Expand Down

0 comments on commit 5758987

Please sign in to comment.