]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
importer: Fix reading Geofeeds from remarks
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Sep 2022 08:03:23 +0000 (08:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Sep 2022 16:47:17 +0000 (16:47 +0000)
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

index 7e2136eee6ae33efcffad0ff4f9a43d07d23fb08..0e2764e6d0a8bbea46dacb82cda4f9a058a7da40 100644 (file)
@@ -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)