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

Use with to open file attachments #342

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Conversation

redblacktree
Copy link
Contributor

Ensures that the file is closed even if there are errors in the process. I discovered this issue because I got a non-200 response that caused the client to raise error code 10000, and my subsequent cleanup code failed to delete a temp file because it was already open.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also moved the open() call closer to where it's used

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.72%. Comparing base (73edf4d) to head (4d3b2cc).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #342      +/-   ##
==========================================
+ Coverage   93.45%   93.72%   +0.27%     
==========================================
  Files         103      103              
  Lines        3924     3935      +11     
  Branches      171      174       +3     
==========================================
+ Hits         3667     3688      +21     
+ Misses        217      209       -8     
+ Partials       40       38       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ej2 ej2 merged commit a696713 into ej2:master Mar 12, 2024
5 checks passed
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