]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Ignore any sudden disconnects when we fetch a Geofeed
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 6 Jan 2025 11:00:10 +0000 (11:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 6 Jan 2025 11:00:10 +0000 (11:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index 3e651b441ffbfd389f74d61db48cfc3e3349bd12..b6f2fa5f2cd1f6d2a7003e0611f62367eead3af8 100644 (file)
@@ -1973,7 +1973,7 @@ class CLI(object):
                                                        WHERE geofeed_id = %s", geofeed.id)
 
                                # Catch any other errors and connection timeouts
-                               except (http.client.InvalidURL, urllib.request.URLError, TimeoutError) as e:
+                               except (http.client.InvalidURL, http.client.RemoteDisconnected, urllib.request.URLError, TimeoutError) as e:
                                        log.debug("Could not fetch URL %s: %s" % (geofeed.url, e))
 
                                        self.db.execute("UPDATE geofeeds SET status = %s, error = %s \