()
| 110 | |
| 111 | |
| 112 | def main(): |
| 113 | try: |
| 114 | _setup() |
| 115 | return _run_server() |
| 116 | except SystemExit as exit_code: |
| 117 | deregister_service(STREAM) |
| 118 | sys.exit(exit_code) |
| 119 | except KeyboardInterrupt: |
| 120 | deregister_service(STREAM) |
| 121 | listener = get_listener_if_set(name="stream") |
| 122 | |
| 123 | if listener: |
| 124 | listener.shutdown() |
| 125 | except Exception: |
| 126 | LOG.exception("(PID=%s) ST2 Stream API quit due to exception.", os.getpid()) |
| 127 | return 1 |
| 128 | finally: |
| 129 | _teardown() |
nothing calls this directly
no test coverage detected