From 331f0c092c1df4254b2f69267673177dd86ab18f Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 12 Dec 2022 10:43:51 +0100 Subject: [PATCH] Added handling for root domains --- cloudflare_script.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloudflare_script.py b/cloudflare_script.py index 46da1cc..f192e49 100644 --- a/cloudflare_script.py +++ b/cloudflare_script.py @@ -79,7 +79,10 @@ class DNSUpdater: names_replace = self.dns_replacements[dnstype] print(names_replace) for name in names_replace: - fullname = f"{name}.{self.HOSTNAME}" + if (name == "@"): + fullname = self.HOSTNAME + else: + fullname = f"{name}.{self.HOSTNAME}" for record in self.DNSRECORDS[dnstype]: if record['name'] == fullname: