Skip to content

Commit

Permalink
i.sentinel.download: Run sys.exit() after message "No product found" (#…
Browse files Browse the repository at this point in the history
…900)

* Run sys.exit() after message No products found

* Update src/imagery/i.sentinel/i.sentinel.download/i.sentinel.download.py

---------

Co-authored-by: Stefan Blumentrath <stefan.blumentrath@gmx.de>
  • Loading branch information
nifg414 and ninsbl committed May 31, 2023
1 parent 06a148b commit 39d7653
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def filter(
products_df = self._api.to_dataframe(products)
if len(products_df) < 1:
gs.message(_("No product found"))
return
sys.exit()

# sort and limit to first sorted product
if sortby:
Expand Down Expand Up @@ -1085,7 +1085,7 @@ def filter_USGS(
scenes.remove(scene)
if len(scenes) < 1:
gs.message(_("No product found"))
return
sys.exit()
scenes_df = pandas.DataFrame.from_dict(scenes)
if sortby:
# replace sortby keywords with USGS keywords
Expand Down

0 comments on commit 39d7653

Please sign in to comment.