TNO Intern

Commit 6dfd3be3 authored by Arjo Segers's avatar Arjo Segers
Browse files

Changed counting of files in S3 bucket following deprecation error.

parent 03751be5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -58,6 +58,9 @@
#   Trap files that could not be downloaded.
#   Added production time of data files to listings.
#
# 2026-07, Arjo Segers
#   Changed counting of files in S3 bucket following deprecation error.
#


########################################################################
@@ -782,7 +785,9 @@ class CSO_DataSpace_Downloader(object):
        pfiles = bucket.objects.filter( Prefix=product )

        # count:
        npfile = len(list(pfiles))
        npfile = 0
        for pfile in pfiles:
            npfile += 1
        # check ...
        if npfile != 1:
            print(f"ERROR - found {npfile} files in S3 bucket for product: {product}")