-
Notifications
You must be signed in to change notification settings - Fork 425
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
Error Handling in rewrite is incorrect. #413
Comments
theGOTOguy
added a commit
to theGOTOguy/python-dotenv
that referenced
this issue
Jul 27, 2022
… scope in the error handling portion of rewrite.
theskumar
pushed a commit
that referenced
this issue
Sep 3, 2022
Resolved by #414 |
I had to revert #414 because the test was failing. Do you want to take another stab at it? |
Looks like it was just a linter error. I submitted a new PR -- #423 should work. |
bbc2
pushed a commit
to theGOTOguy/python-dotenv
that referenced
this issue
Nov 11, 2022
Fixes theskumar#413 whereby the NamedTemporaryFile "dest" was out of scope in the error handling portion of rewrite. The problem was initially fixed in theskumar#414 but it got reverted because of a linter error. This new commit works around that linter error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Look at:
https://github.com/theskumar/python-dotenv/blob/master/src/dotenv/main.py#L136
If lines 136, 137 or 140 there are ever hit, an error "local variable 'dest' referenced before assignment" will be thrown, because the
dest
variable only exists within the scope of thewith
block above.The text was updated successfully, but these errors were encountered: