Fix signal handling with pyinstaller.
Raise a ShutdownException instead of a KeyboardInterupt when a thread.error is caught. This thread.error is only raised when run from a pyinstaller binary (for reasons unknown). Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
fc99c7ee19
commit
ed4473c849
3 changed files with 26 additions and 15 deletions
|
|
@ -54,7 +54,7 @@ def main():
|
|||
try:
|
||||
command = TopLevelCommand()
|
||||
command.sys_dispatch()
|
||||
except KeyboardInterrupt:
|
||||
except (KeyboardInterrupt, signals.ShutdownException):
|
||||
log.error("Aborting.")
|
||||
sys.exit(1)
|
||||
except (UserError, NoSuchService, ConfigurationError) as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue