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
Move _handle attribute up in CloudPath __init__ #300
Conversation
The _handle attribute needs to be set before any code can raise an exception. This is because if something tries to call __del__ after the exception as the process is exiting, _handle must be set to avoid an AttributeError in __del__. Resolves #299.
Thanks @bryanwweber—looks like you need to run |
Thanks @pjbull! Fixed now 😄 That's what I get for trying to make the change on the Web interface 😝 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #300 +/- ##
========================================
- Coverage 94.9% 94.5% -0.4%
========================================
Files 21 21
Lines 1341 1341
========================================
- Hits 1273 1268 -5
- Misses 68 73 +5
|
Thanks @bryanwweber! I'll merge this in to a repo-local branch so we can run the live tests. |
Thanks! Do I need to do anything else? |
Nope, once tests pass in #301 I'll merge it in! It'll be in the next release, thanks! |
Great thank you for the quick responses! |
* Move _handle attribute up in CloudPath __init__ The _handle attribute needs to be set before any code can raise an exception. This is because if something tries to call __del__ after the exception as the process is exiting, _handle must be set to avoid an AttributeError in __del__. Resolves #299. * Formatting Co-authored-by: Bryan Weber <bweber@rebelliondefense.com> Co-authored-by: Bryan Weber <bryan.w.weber@gmail.com> Co-authored-by: Bryan Weber <bweber@rebelliondefense.com>
The _handle attribute needs to be set before any code can raise an exception. This is because if something tries to call del after the exception as the process is exiting, _handle must be set to avoid an AttributeError in del.
Resolves #299.