From: Michael Tremer Date: Mon, 3 Jul 2023 15:05:13 +0000 (+0000) Subject: export: Raise an error when trying to export ipset for both families X-Git-Tag: 0.9.17~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f2ece2868f370bda1c4c01be401bcfb137f383d;p=location%2Flibloc.git export: Raise an error when trying to export ipset for both families Signed-off-by: Michael Tremer --- diff --git a/src/python/location/export.py b/src/python/location/export.py index 25a532e..1d147b1 100644 --- a/src/python/location/export.py +++ b/src/python/location/export.py @@ -147,6 +147,10 @@ class IpsetOutputWriter(OutputWriter): # Count all networks self.networks = 0 + # Check that family is being set + if not self.family: + raise ValueError("%s requires family being set" % self.__class__.__name__) + @property def hashsize(self): """