From d41708ee247ce5efc5dc06f2d233e8d620fc6e4a Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sat, 23 May 2020 07:09:10 +0100 Subject: http-api: T2494: always exit with non zero on failure systemd is setup with Restart=on-failure thereforer the service will only be restarted if the daemon died and reported an error. Previously any OsError would cause a exit(0) and therefore the API would not have been restarted. https://www.freedesktop.org/software/systemd/man/systemd.service.html --- src/services/vyos-http-api-server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index 4c41fa96d..b256add98 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -400,4 +400,4 @@ if __name__ == '__main__': serve(app, host=server_config["listen_address"], port=server_config["port"]) except OSError as e: - print(f"OSError {e}") + sys.exit(f"OSError {e}") -- cgit v1.2.3