Skip to content

Conversation

@ricochet
Copy link
Contributor

No description provided.

On Windows, file handles must be closed before other processes can access or delete the file. Added file.close() immediately after creating the temp file so:
  1. urlretrieve can write to it
  2. tarfile.open can read it
  3. os.unlink can delete it
Copy link
Contributor

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

A little surprised we can't keep the with here but a try finally is also fine

@vados-cosmonic vados-cosmonic merged commit 51dcaab into main Dec 30, 2025
17 checks passed
@ricochet ricochet deleted the fix-temp-file branch January 5, 2026 16:08
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.

3 participants