Skip to content

Commit

Permalink
sauron: strictly exit when no endpoint
Browse files Browse the repository at this point in the history
The exception might be excepted, and we would continue execution. This works better after ElementsProject/lightning#3675 which will immediately make lightningd die if we exit

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
  • Loading branch information
darosior authored and cdecker committed Apr 30, 2020
1 parent 8438491 commit 810bedd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sauron/sauron.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import sys
import requests

from art import sauron_eye
Expand All @@ -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)
Expand Down

0 comments on commit 810bedd

Please sign in to comment.