Skip to content

Use with to open file attachments#342

Merged
ej2 merged 2 commits intoroutablehq:masterfrom
redblacktree:use-with-to-open
Mar 12, 2024
Merged

Use with to open file attachments#342
ej2 merged 2 commits intoroutablehq:masterfrom
redblacktree:use-with-to-open

Conversation

@redblacktree
Copy link
Copy Markdown
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.

Comment thread quickbooks/client.py
Copy link
Copy Markdown
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
Copy Markdown

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 routablehq:master Mar 12, 2024
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