]> git.ipfire.org Git - location/libloc.git/commitdiff
location-exporter: Fix syntax errors for nftables export
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2019 15:37:26 +0000 (15:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2019 15:37:26 +0000 (15:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location-exporter.in

index 983a7e864f77a17444d740378b353e992bd048ca..28f761aa5055996cc4da0e4556abf6fb898ee88c 100644 (file)
@@ -140,11 +140,11 @@ class NftablesOutputWriter(OutputWriter):
        suffix = "set"
 
        def _write_header(self, f):
-               h = "define %s = {" % self.name
+               h = "define %s = {\n" % self.name
 
                f.write(h.encode("ascii"))
 
-       def _write_footer(self):
+       def _write_footer(self, f):
                f.write(b"}")
 
        def write(self, network):