Browse Source

Shut down more or less gracefully

master
Johann Schmitz 7 months ago
parent
commit
6b17ed058a
Signed by: ercpe <johann@j-schmitz.net> GPG Key ID: A084064277C501ED
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      docker_hosts/__main__.py

+ 12
- 1
docker_hosts/__main__.py View File

@@ -22,7 +22,18 @@ def main():
network_filter=args.network_filter,
hosts_file=args.hosts_file,
pattern=args.pattern)
c.run()
def _stop():
if c and c.client:
c.client.close()
try:
c.run()
_stop()
except BaseException as ex:
_stop()
if not isinstance(ex, KeyboardInterrupt):
raise


if __name__ == "__main__":


Loading…
Cancel
Save