From cb9165a2431580a2c8cc21dc48c74e5b7ec645ee Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 1 Aug 2023 13:02:31 -0700 Subject: [PATCH] do not upload empty file --- pv2/importer/operation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pv2/importer/operation.py b/pv2/importer/operation.py index 8b610b0..6239556 100644 --- a/pv2/importer/operation.py +++ b/pv2/importer/operation.py @@ -147,6 +147,8 @@ class Import: for file in os.scandir(f'{local_repo_path}/SOURCES'): full_path = f'{local_repo_path}/SOURCES/{file.name}' magic = fileutil.get_magic_file(full_path) + if magic.name == 'empty': + continue if magic.encoding == 'binary': source_dict[f'SOURCES/{file.name}'] = fileutil.get_checksum(full_path)