From 9b232c87ad056e8e53498fdf7f899d0bbb5a92d8 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 29 Jun 2018 15:53:27 -0700 Subject: [PATCH] Allow empty files to be uploaded if check content is off. --- tools/data_source/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/data_source/upload.py b/tools/data_source/upload.py index 6b4f636d7da..3e05aef66e9 100644 --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -108,7 +108,7 @@ def add_file(dataset, registry, output_path): if not os.path.exists(dataset.path): raise UploadProblemException('Uploaded temporary file (%s) does not exist.' % dataset.path) - if not os.path.getsize(dataset.path) > 0: + if check_content and not os.path.getsize(dataset.path) > 0: raise UploadProblemException('The uploaded file is empty') stdout, ext, datatype, is_binary, converted_path = handle_upload(