mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-20 06:34:20 +01:00
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 <darosior@protonmail.com>
This commit is contained in:
committed by
Christian Decker
parent
8438491350
commit
810bedddc0
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from art import sauron_eye
|
from art import sauron_eye
|
||||||
@@ -17,6 +18,7 @@ def init(plugin, options, configuration, **kwargs):
|
|||||||
plugin.api_endpoint = options.get("sauron-api-endpoint")
|
plugin.api_endpoint = options.get("sauron-api-endpoint")
|
||||||
if not plugin.api_endpoint:
|
if not plugin.api_endpoint:
|
||||||
raise SauronError("You need to specify the sauron-api-endpoint option.")
|
raise SauronError("You need to specify the sauron-api-endpoint option.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
plugin.log("Sauron plugin initialized")
|
plugin.log("Sauron plugin initialized")
|
||||||
plugin.log(sauron_eye)
|
plugin.log(sauron_eye)
|
||||||
|
|||||||
Reference in New Issue
Block a user