From 7c4f3c7e4a92e74b779b1274025e61cbe671036c Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 26 Jan 2026 10:47:47 +0100 Subject: [PATCH] dns/ddclient: style sweep --- .../opnsense/scripts/ddclient/lib/account/hostinger.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dns/ddclient/src/opnsense/scripts/ddclient/lib/account/hostinger.py b/dns/ddclient/src/opnsense/scripts/ddclient/lib/account/hostinger.py index 74da1d183..b9b004e35 100755 --- a/dns/ddclient/src/opnsense/scripts/ddclient/lib/account/hostinger.py +++ b/dns/ddclient/src/opnsense/scripts/ddclient/lib/account/hostinger.py @@ -54,13 +54,13 @@ class Hostinger(BaseAccount): if super().execute(): # IPv4/IPv6 recordType = "AAAA" if str(self.current_address).find(':') > 1 else "A" - + # Validate TTL ttl = int(self.settings.get('ttl', 300)) if (60 <= int(self.settings.get('ttl', 300)) <= 86400) else 300 # Use bearer authentication url = "https://developers.hostinger.com/api/dns/v1/zones/" + self.settings.get('zone') - + # Build the zone update payload payload = { "overwrite": True, @@ -77,13 +77,13 @@ class Hostinger(BaseAccount): } ] } - + headers = { 'authorization': "Bearer " + self.settings.get('password'), 'content-type': "application/json", 'User-Agent': 'OPNsense-dyndns' } - + # Send IP address update req = requests.request("PUT", url, data=json.dumps(payload), headers=headers) if 200 <= req.status_code < 300: @@ -103,4 +103,4 @@ class Hostinger(BaseAccount): ) ) - return False \ No newline at end of file + return False