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

Fail silently when caching throws OSError #184

Merged
merged 4 commits into from
Jun 20, 2022

Conversation

DragaDoncila
Copy link
Contributor

Saving to cache with the current cache_path could (rarely) throw an OSError if the user didn't have permission to write to /home. We have run into this on the napari hub when working in a Docker image that only allows us to write to /tmp.

Since caching is just a convenience, this PR catches OSError on caching and fails silently.

@codecov
Copy link

codecov bot commented Jun 19, 2022

Codecov Report

Merging #184 (dc3b62c) into main (dce3252) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #184   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         1794      1796    +2     
=========================================
+ Hits          1794      1796    +2     
Impacted Files Coverage Δ
npe2/manifest/_npe1_adapter.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dce3252...dc3b62c. Read the comment docs.

Copy link
Collaborator

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

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

🎉 thanks!

@tlambert03 tlambert03 merged commit 14aca56 into napari:main Jun 20, 2022
@tlambert03 tlambert03 added the bug Something isn't working label Jun 21, 2022
@tlambert03 tlambert03 changed the title Fail silently when caching throws OSError Fail silently when caching throws OSError Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants