[08/10] importer: Fix reading Geofeeds from remarks

Message ID 20220927164847.3409646-8-michael.tremer@ipfire.org
State Accepted
Commit 45c0536c76fc203cccc8dc1b6214329a97fcbc49
Headers
Series [01/10] importer: Store geofeed URLs from RIR data |

Commit Message

Michael Tremer Sept. 27, 2022, 4:48 p.m. UTC
  Only RIPE has a dedicated geofeed field. For others, this data needs to
be read from the remarks section.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 src/scripts/location-importer.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in
index 7e2136e..0e2764e 100644
--- a/src/scripts/location-importer.in
+++ b/src/scripts/location-importer.in
@@ -863,8 +863,8 @@  class CLI(object):
 				inetnum["geofeed"] = val
 
 			# Parse geofeed when used as a remark
-			elif key == "remark":
-				m = re.match(r"^(?:geofeed|Geofeed)\s+(https://.*)", val)
+			elif key == "remarks":
+				m = re.match(r"^(?:Geofeed)\s+(https://.*)", val)
 				if m:
 					inetnum["geofeed"] = m.group(1)