diff --git a/LiCSBAS_lib/LiCSBAS_tools_lib.py b/LiCSBAS_lib/LiCSBAS_tools_lib.py index 7d7fe40..d31ea27 100644 --- a/LiCSBAS_lib/LiCSBAS_tools_lib.py +++ b/LiCSBAS_lib/LiCSBAS_tools_lib.py @@ -8,6 +8,8 @@ ========= Changelog ========= +v1.6.2 20201225 Yu Morishita, GSI + - Avoid error when remote file is empty v1.6.1 20201207 Yu Morishita, GSI - Check size and retry if error in download_data v1.6 20200911 Yu Morishita, GSI @@ -67,6 +69,9 @@ def comp_size_time(file_remote, file_local): if response.status_code != 200: return 3 + elif response.headers.get("Content-Length") is None: + ## Remote file exist but empty + return 3 size_remote = int(response.headers.get("Content-Length")) size_local = os.path.getsize(file_local)