From: Michael Tremer Date: Sat, 5 Mar 2022 13:26:23 +0000 (+0000) Subject: importer: Skip empty lines X-Git-Tag: 0.9.12~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b767db8d13c7fca8f79646a02c41b3a95ea68344;p=people%2Fms%2Flibloc.git importer: Skip empty lines Signed-off-by: Michael Tremer --- diff --git a/src/python/location-importer.in b/src/python/location-importer.in index 0756b5d..3b36184 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -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