Skip to content

fix: use missing_ok for temp file cleanup to avoid masking errors - #3820

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/presets-registry-encoding
Open

fix: use missing_ok for temp file cleanup to avoid masking errors#3820
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/presets-registry-encoding

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Replace if temp_path.exists(): temp_path.unlink() with emp_path.unlink(missing_ok=True) in 3 files: integrations/manifest.py, shared_infra.py, _utils.py. The old pattern could raise OSError if unlink() fails, masking the original exception in inally/except blocks.

@Quratulain-bilal
Quratulain-bilal requested a review from mnriem as a code owner July 28, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant