aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2024-03-12 17:09:14 -0700
committerJordan <me@jordan.im>2024-03-12 17:09:14 -0700
commit92154fb257138996a9169ed6bcb32992d40f9661 (patch)
tree87a1875ba9bc77658819b61c53738804b256216f
parent07db95756a1d5d4c9e1ff325979a473ce7f5f2f2 (diff)
downloaddesec-zones-92154fb257138996a9169ed6bcb32992d40f9661.tar.gz
desec-zones-92154fb257138996a9169ed6bcb32992d40f9661.zip
zones: rewrite zone files when run against stale sets (ab -> wb)HEADmaster
-rwxr-xr-xzones.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/zones.py b/zones.py
index 0099b3e..4bf05d6 100755
--- a/zones.py
+++ b/zones.py
@@ -47,6 +47,6 @@ if __name__ == "__main__":
name = domain["name"]
zone = get_zone(name)
path = os.path.join(args.path, name + ".zone")
- with open(path, "ab") as zone_file:
+ with open(path, "wb") as zone_file:
zone_file.write(zone)
log.info(f"Wrote {name}'s zone file to {path}")