Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make tar decompression only consider regular files #1260

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

adamantike
Copy link
Collaborator

The tar decompression function was failing for some users, with error message:

'NoneType' object does not support the context manager protocol

As explained in the official documentation [1], the extractfile method returns None if the member is not a regular file or a link. This change skips any member that is not a regular file.

[1] https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractfile

The `tar` decompression function was failing for some users, with error
message:

```
'NoneType' object does not support the context manager protocol
```

As explained in the official documentation [1], the `extractfile` method
returns `None` if the member is not a regular file or a link. This
change skips any member that is not a regular file.

[1] https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractfile
Copy link

Test Results

88 tests  ±0   88 ✅ ±0   26s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 8fd680a. ± Comparison against base commit 373757e.

@adamantike adamantike merged commit e79ff38 into master Oct 29, 2024
8 checks passed
@adamantike adamantike deleted the fix/tar-decompression-only-consider-files branch October 29, 2024 16:22
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.

2 participants