From fddceb445928dc8064486e657da240d7179feb34 Mon Sep 17 00:00:00 2001 From: paulbsd Date: Thu, 17 Jun 2021 10:06:44 +0200 Subject: [PATCH] Update 'states/_modules/syncthing.py' --- states/_modules/syncthing.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/states/_modules/syncthing.py b/states/_modules/syncthing.py index 9ab84a5..cc71230 100644 --- a/states/_modules/syncthing.py +++ b/states/_modules/syncthing.py @@ -63,9 +63,10 @@ def insync(url, verify, apikey): def restart(url, verify, apikey): fullurl = f"{url}/rest/system/restart" try: - req = requests.post(fullurl, - verify=verify, - headers={"X-API-Key": apikey}) + req = requests.request("post", + fullurl, + verify=verify, + headers={"X-API-Key": apikey}) except (requests.exceptions.RequestException) as exc: raise f"Exception {exc} occured" if req.status_code == 200: