emit to dbfile
authorRalf Jung <post@ralfj.de>
Sun, 9 Nov 2014 17:56:11 +0000 (18:56 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 9 Nov 2014 17:56:11 +0000 (18:56 +0100)
.gitignore
zonemaker/zone.py

index e941f9591613be4b3b5070c0ba14a500018b0acc..5515fc54a3896923eacf8c62633a59a50253f878 100644 (file)
@@ -1,2 +1,2 @@
 __pycache__
-ralfj.de.*
+*ralfj.de*
index 3033a23762513f1569b27459a27a441fdab301ca..1999ddc960e3f35ab1a6fcf6e37e8f7290f360fd 100644 (file)
@@ -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)