Skip to content

Commit

Permalink
refactor: rollback the specific error catch
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau committed Oct 9, 2024
1 parent fffdacb commit a26343e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions geetools/ImageCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,12 +940,12 @@ def reduce(ic):

# catch the error if the reducer is not available in the ee.ImageCollection class
# and provide a more meaningful error message.
# try:
reducedImagesList = imageCollectionList.map(reduce)
# except AttributeError:
# raise AttributeError(
# f'Reducer "{reducer}" not available in the ee.ImageCollection class'
# )
try:
reducedImagesList = imageCollectionList.map(reduce)
except AttributeError:
raise AttributeError(
f'Reducer "{reducer}" not available in the ee.ImageCollection class'
)

return ee.ImageCollection(reducedImagesList)

Expand Down

0 comments on commit a26343e

Please sign in to comment.