[03/10] importer: Just fetch any exception from the executor
Commit Message
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -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)