Interactive interface for browsing global, full-resolution satellite imagery
fix bug where config would crash if GC contained an empty ows:Metadata element
Mike McGann9815d660e458
diff --git a/tasks/extractConfigFromWMTS.py b/tasks/extractConfigFromWMTS.pyindex 6e230d37c..7768f71d1 100755--- a/tasks/extractConfigFromWMTS.py+++ b/tasks/extractConfigFromWMTS.py@@ -100,7 +100,7 @@ def process_layer(gc_layer, wv_layers, colormaps):}# Colormap links- if "ows:Metadata" in gc_layer:+ if "ows:Metadata" in gc_layer and gc_layer["ows:Metadata"] is not None:if "skipPalettes" in config and ident in config["skipPalettes"]:sys.stderr.write("%s: WARNING: Skipping palette for %s\n" % (prog, ident))diff --git a/tasks/getCapabilities.py b/tasks/getCapabilities.pyindex 93a0fd74f..01d70ddd7 100755--- a/tasks/getCapabilities.py+++ b/tasks/getCapabilities.py@@ -69,7 +69,7 @@ def process_layer(layer):prog, ident)global warning_countwarning_count += 1- else:+ elif layer["ows:Metadata"] is not None:for item in layer["ows:Metadata"]:schema_version = item["@xlink:role"]if schema_version == "http://earthdata.nasa.gov/gibs/metadata-type/colormap/1.3":