From b767db8d13c7fca8f79646a02c41b3a95ea68344 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 5 Mar 2022 13:26:23 +0000 Subject: [PATCH] importer: Skip empty lines Signed-off-by: Michael Tremer --- src/python/location-importer.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 -- 2.47.2