From: Ralf Jung Date: Sun, 9 Nov 2014 17:56:11 +0000 (+0100) Subject: emit to dbfile X-Git-Url: https://git.ralfj.de/zonemaker.git/commitdiff_plain/c01124488ecc8884ee456feda85171e833fd3e71?ds=sidebyside emit to dbfile --- 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)