Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

catch exceptions from process_remote call

Jason Kent31d72bb9a2d4
diff --git a/tasks/python3/getCapabilities.py b/tasks/python3/getCapabilities.py
index 56e788c8e..d37270e68 100755
--- a/tasks/python3/getCapabilities.py
+++ b/tasks/python3/getCapabilities.py
@@ -179,20 +179,23 @@ def process_vectordata():
global warning_count
warning_count += 1
+futures = []
tolerant = config.get("tolerant", False)
if "wv-options-fetch" in config:
with ThreadPoolExecutor() as executor:
for entry in config["wv-options-fetch"]:
- try:
- remote_count += 1
- executor.submit(process_remote, entry)
- except Exception as e:
- if tolerant:
- warning_count += 1
- sys.stderr.write("%s: WARN: %s\n" % (prog, str(e)))
- else:
- error_count += 1
- sys.stderr.write("%s: ERROR: %s\n" % (prog, str(e)))
+ futures.append(executor.submit(process_remote, entry))
+ for future in futures:
+ try:
+ remote_count += 1
+ future.result()
+ except Exception as e:
+ if tolerant:
+ warning_count += 1
+ sys.stderr.write("%s: WARN: %s\n" % (prog, str(e)))
+ else:
+ error_count += 1
+ sys.stderr.write("%s: ERROR: %s\n" % (prog, str(e)))
if colormaps:
process_colormaps()
if vectorstyles: