]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Skip ASN lines in extended format
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 7 Mar 2024 13:56:20 +0000 (13:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 7 Mar 2024 13:56:20 +0000 (13:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index b23ed32e6805b95f1d7ee99aa2c20fb1a436ed52..f9c068e6c31acfce5334b70be94a5e390eb87ba9 100644 (file)
@@ -1354,8 +1354,12 @@ class CLI(object):
                        log.warning("Could not parse line: %s" % line)
                        return
 
+               # Skip ASN
+               if type == "asn":
+                       return
+
                # Skip any unknown protocols
-               if not type in ("ipv6", "ipv4"):
+               elif not type in ("ipv6", "ipv4"):
                        log.warning("Unknown IP protocol '%s'" % type)
                        return