From c01124488ecc8884ee456feda85171e833fd3e71 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 9 Nov 2014 18:56:11 +0100 Subject: [PATCH] emit to dbfile --- .gitignore | 2 +- zonemaker/zone.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e941f95..5515fc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ __pycache__ -ralfj.de.* +*ralfj.de* diff --git a/zonemaker/zone.py b/zonemaker/zone.py index 3033a23..1999ddc 100644 --- a/zonemaker/zone.py +++ b/zonemaker/zone.py @@ -164,5 +164,7 @@ class Zone: yield rr def write(self) -> None: - for rr in self.generate_rrs(): - print(rr) + with open(self._dbfile, 'w') as f: + for rr in self.generate_rrs(): + f.write(rr+"\n") + print(rr) -- 2.30.2