From: Michael Tremer Date: Tue, 4 Oct 2022 08:47:03 +0000 (+0000) Subject: export: Fix generating file names for ipset output X-Git-Tag: 0.9.16~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd214f295797e5cc8dbc296753924863b33ab8bd;p=location%2Flibloc.git export: Fix generating file names for ipset output The tag that is being used in the filename was set after creating the filename. The order has now been fixed and the export works fine for me. Fixes: #12944 Signed-off-by: Michael Tremer --- diff --git a/src/python/location/export.py b/src/python/location/export.py index f5ed37f..3f58498 100644 --- a/src/python/location/export.py +++ b/src/python/location/export.py @@ -48,6 +48,9 @@ class OutputWriter(object): self.family = family self.directory = directory + # Tag + self.tag = self._make_tag() + # Open output file if f: self.f = f @@ -58,9 +61,6 @@ class OutputWriter(object): else: self.f = io.StringIO() - # Tag - self.tag = self._make_tag() - # Call any custom initialization self.init()