From 38d0faeabb9f7cea8394521a45f9ed204a4e16fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Sat, 18 Dec 2021 13:57:45 +0100 Subject: [PATCH] location-importer.in: Do not make things more complicated than they are MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Suggested-by: Michael Tremer Signed-off-by: Peter Müller Reviewed-by: Michael Tremer Signed-off-by: Michael Tremer --- src/python/location-importer.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/location-importer.in b/src/python/location-importer.in index 63f7be5..83fb5c7 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -687,7 +687,7 @@ class CLI(object): start_address = ipaddress.ip_network(start_address, strict=False) except ValueError: start_address = start_address.split("/") - ldigits = len(start_address[0].split(".")) + ldigits = start_address[0].count(".") # How many octets do we need to add? # (LACNIC does not seem to have a /8 or greater assigned, so the following should suffice.) -- 2.47.2