]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/python/location-importer.in
importer: Skip empty lines
[people/ms/libloc.git] / src / python / location-importer.in
index 0756b5d0b6013df29c70b58c077083dc5589a279..3b361841949b7c99493dc3311ba6550273c0e92b 100644 (file)
@@ -988,12 +988,18 @@ class CLI(object):
                for line in self._bird_cmd(server, "show route"):
                        m = route.match(line)
                        if not m:
+                               # Skip empty lines
+                               if not line:
+                                       pass
+
                                # Ignore any header lines with the name of the routing table
-                               if line.startswith(b"Table"):
-                                       continue
+                               elif line.startswith(b"Table"):
+                                       pass
 
                                # Log anything else
-                               log.debug("Could not parse line: %s" % line.decode())
+                               else:
+                                       log.debug("Could not parse line: %s" % line.decode())
+
                                continue
 
                        # Fetch the extracted network and ASN