-
Notifications
You must be signed in to change notification settings - Fork 199
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
MountLock context manager (was: Exception handling in mount/unmount; Enable lint check W0706) #1799
base: dev
Are you sure you want to change the base?
Conversation
Hi Manual, There is more wrong then just a not handled exception. On a quick view I would assume that the goal of this code construct was that the code block in Today you would solve something like this with a context manager. But I am not sure at all and would need some time to dive into it. Best, As an example you see here that the exception is re-raised but
|
Hi Christian, Okay, I will try to embed this in a context manager. Regards, Manuel |
Please have a look if our (quit fresh) |
My advice would be to extract the five methods |
W0706 complains if an Exception is directly raised back without any handling. First I wanted to remove the try / catch blocks completely, but the I've seen that there are also "finally" statements. Therefore I just added some logging, which caused the lint check to run successful.