From bc0d335efe0af0873d4cc0b203920e7450e88104 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Fri, 28 Jun 2024 20:51:52 +0200 Subject: [PATCH] updated modules --- states/_modules/syncthing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/states/_modules/syncthing.py b/states/_modules/syncthing.py index 748838a..2769406 100644 --- a/states/_modules/syncthing.py +++ b/states/_modules/syncthing.py @@ -30,7 +30,11 @@ def get_apikey(configfile="/root/.config/syncthing/config.xml"): return None -def get_config(url="http://localhost:8384", verify=False, apikey=get_apikey()): +def get_config(url="http://localhost:8384", verify=False, apikey=""): + try: + apikey=get_apikey() + except: + return None fullurl = f"{url}/rest/config" req = Request(method="GET", url=fullurl)