]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Skip empty lines
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Mar 2022 13:26:23 +0000 (13:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Mar 2022 13:26:23 +0000 (13:26 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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