]> git.ipfire.org Git - location/libloc.git/commitdiff
location-import: Abort when we could not parse the prefix
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 May 2020 16:19:41 +0000 (16:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 May 2020 16:19:41 +0000 (16:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location-importer.in

index f1da3e4289f1e43f9e516532f9ecf031d685bb75..0551cf6605b9a58426df329ff3342d1fb875912d 100644 (file)
@@ -422,6 +422,7 @@ class CLI(object):
                        prefix = int(prefix)
                except:
                        log.warning("Invalid prefix: %s" % prefix)
+                       return
 
                # Fix prefix length for IPv4
                if type == "ipv4":