TNO Intern

Commit 730b8d93 authored by Arjo Segers's avatar Arjo Segers
Browse files

Fixed error trap on corrupted zip file.

parent 2f63c986
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -12,6 +12,9 @@
# 2024-01, Arjo Segers
#   Do not use timeout when downloading.
#
# 2024-01, Arjo Segers
#   Fixed error trap on corrupted zip file.
#

########################################################################
###
@@ -799,8 +802,9 @@ class CSO_DataSpace_Downloader(object):

            except Exception as err:
                # info ..
                msg = str(err)
                logging.error("from download; message received:")
                logging.error("  %s" % str(err))
                logging.error("  %s" % msg)
                # catch known problem ...
                if msg.startswith("File is not a zip file"):
                    logging.warning(f"{indent}maybe download was interrupted, try again  ...")