Skip to content

Commit

Permalink
#179 Raise exception on Null ranges (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatnick authored Jan 6, 2020
1 parent 3a5d67f commit 3b690b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datacube_ows/ows_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,11 @@ def __init__(self, cfg, global_cfg, dc, parent_layer=None):
from datacube_ows.product_ranges import get_ranges
try:
self.ranges = get_ranges(dc, self)
if self.ranges is None:
raise Exception("Null product range")
except Exception as a:
raise ConfigException("get_ranges failed for layer %s: %s" % (self.name, str(a)))
range_failure = "get_ranges failed for layer %s: %s" % (self.name, str(a))
raise ConfigException(range_failure)
self.bboxes = self.extract_bboxes()
# sub-ranges???
self.band_idx = BandIndex(self.product, cfg.get("bands"), dc)
Expand Down

0 comments on commit 3b690b7

Please sign in to comment.