]> git.ipfire.org Git - location/libloc.git/blobdiff - src/python/location-importer.in
location-importer.in: Do not make things more complicated than they are
[location/libloc.git] / src / python / location-importer.in
index 63f7be592327e98620c80a5b488c0d6309222baf..83fb5c7d3360443de5cf1057140bdb434c59defd 100644 (file)
@@ -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.)