From 810bedddc0f05be9c6c8ff438697f53ad8fe49e3 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 30 Apr 2020 10:57:39 +0200 Subject: [PATCH] sauron: strictly exit when no endpoint The exception might be excepted, and we would continue execution. This works better after https://github.com/ElementsProject/lightning/pull/3675 which will immediately make lightningd die if we exit Signed-off-by: Antoine Poinsot --- sauron/sauron.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sauron/sauron.py b/sauron/sauron.py index 2378dd9..209f358 100755 --- a/sauron/sauron.py +++ b/sauron/sauron.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import sys import requests from art import sauron_eye @@ -17,6 +18,7 @@ def init(plugin, options, configuration, **kwargs): plugin.api_endpoint = options.get("sauron-api-endpoint") if not plugin.api_endpoint: raise SauronError("You need to specify the sauron-api-endpoint option.") + sys.exit(1) plugin.log("Sauron plugin initialized") plugin.log(sauron_eye)