From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: location@lists.ipfire.org Subject: [PATCH] location-importer.in: Do not make things more complicated than they are Date: Sat, 18 Dec 2021 13:57:45 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3068069918881893304==" List-Id: --===============3068069918881893304== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Suggested-by: Michael Tremer Signed-off-by: Peter M=C3=BCller --- 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 118b0de..f39a42b 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -687,7 +687,7 @@ class CLI(object): start_address =3D ipaddress.ip_network(start_address, strict=3DFalse) except ValueError: start_address =3D start_address.split("/") - ldigits =3D len(start_address[0].split(".")) + ldigits =3D start_address[0].count(".") =20 # How many octets do we need to add? # (LACNIC does not seem to have a /8 or greater assigned, so the follo= wing should suffice.) --=20 2.26.2 --===============3068069918881893304==--