From a26343e245ae7be31a0e7cfeec8b428cd7b1093d Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Wed, 9 Oct 2024 09:07:03 +0000 Subject: [PATCH] refactor: rollback the specific error catch --- geetools/ImageCollection.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/geetools/ImageCollection.py b/geetools/ImageCollection.py index dce9b96..b9cf230 100644 --- a/geetools/ImageCollection.py +++ b/geetools/ImageCollection.py @@ -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)