]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
importer: Just fetch any exception from the executor
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Sep 2022 07:58:41 +0000 (07:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Sep 2022 16:47:17 +0000 (16:47 +0000)
Any exceptions will only be raised in the main thread when they are
fetched from the executor. We do not need to print any other return
values here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index ddec3762f6b7aba5397fab8e0bb807aed255bd55..014f3b65f60fe99808533c5a9d869c39c64b9219 100644 (file)
@@ -1297,8 +1297,9 @@ class CLI(object):
                with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
                        results = executor.map(self._fetch_geofeed, geofeeds)
 
+                       # Fetch all results to raise any exceptions
                        for result in results:
-                               print(result)
+                               pass
 
        def _fetch_geofeed(self, geofeed):
                log.debug("Fetching Geofeed %s" % geofeed.url)