Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions codecov_cli/services/upload/upload_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,21 @@ def _get_file_fixers(
return file_fixers

def _get_files(self, upload_data: UploadCollectionResult):
return [self._format_file(file) for file in upload_data.files]
return [
result
for result in (self._format_file(file) for file in upload_data.files)
if result is not None
]

def _format_file(self, file: UploadCollectionResultFile):
format, formatted_content = self._get_format_info(file)
try:
format, formatted_content = self._get_format_info(file)
except FileNotFoundError:
logger.warning(
f"Coverage file not found, skipping: {file.get_filename()}. "
"The file may have been removed before upload (e.g. a temporary coverage file cleaned up by the test framework)."
)
return None
return {
"filename": file.get_filename(),
"format": format,
Expand Down
Loading