★ wanayoo — archive 1999 https://github.com/theskumar/python-dotenv/pull/245Nouvelle recherche | Portail wanayoo
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

Added better context for can't find config file error message #245

Merged
merged 1 commit into from Apr 29, 2020

Conversation

@snobu
Copy link
Contributor

@snobu snobu commented Mar 17, 2020

No description provided.

@coveralls
Copy link

@coveralls coveralls commented Mar 17, 2020 •

Coverage Status

Coverage remained the same at 89.806% when pulling 6d1664f on snobu:patch-1 into 7841022 on theskumar:master.

@bbc2 bbc2 self-assigned this Mar 18, 2020
@snobu
Copy link
Contributor Author

@snobu snobu commented Mar 22, 2020 •

https://github.com/theskumar/python-dotenv/pull/245/files#diff-801425242c4901b4508f6da6283b0100R67

We should probably add Code execution continues with system environment variables since it's not clear if this is recoverable.

Copy link
Owner

@theskumar theskumar left a comment

@snobu Please update the tests to make the test pass on our Travis-CI. Thanks for your contribution. https://travis-ci.org/github/theskumar/python-dotenv/jobs/663461038#L278-L293

image

@snobu
Copy link
Contributor Author

@snobu snobu commented Apr 24, 2020 •

I fixed all the tests... eventually :)

@snobu
Copy link
Contributor Author

@snobu snobu commented Apr 24, 2020 •

Oh, should we add this other thing or not?
Code execution continues with system environment variables.

@bbc2
Copy link
Collaborator

@bbc2 bbc2 commented Apr 26, 2020

I think this looks good.

I wasn't convinced by this change at first because context is provided by the logging module. When you configure logging in your application, you can choose to show that context. But I suppose that many users don't know that or don't want to do that, so hard-coding that context could be useful.

I wouldn't add the "Code execution continues with system environment variables" message because it makes it look like using environment variables is unusual, which it isn't (as I explain in #164). I would even go as far as turning that logger.warning into logging.info, for the same reason, but I would be happy to merge your change as-is.

snobu added a commit to snobu/python-dotenv that referenced this pull request Apr 26, 2020
snobu added a commit to snobu/python-dotenv that referenced this pull request Apr 26, 2020
@snobu
Copy link
Contributor Author

@snobu snobu commented Apr 26, 2020 •

Sorry this took a while and quite a few build cycles as i thought i'm gonna be a smartass and not clone locally but wing it over the browser... and we all know how that ends.

Should be fine now, i amended the logging level to info, fixed the tests and dropped the square brackets to be consistent with the rest of the verbose output.

'File doesn't exist' doesn't really tell the user much, let's add some context.
@bbc2 bbc2 force-pushed the snobu:patch-1 branch from 1aca3ee to 6d1664f Apr 28, 2020
@bbc2 bbc2 requested a review from theskumar Apr 28, 2020
@bbc2
Copy link
Collaborator

@bbc2 bbc2 commented Apr 28, 2020

Thanks for the improvements. I squashed the commits together and slightly simplified the test.

There are other things about the output of python-dotenv that can be improved but this is already a good step forward.

@theskumar
Copy link
Owner

@theskumar theskumar commented Apr 29, 2020

I agree with @bbc2 !

@theskumar theskumar merged commit e92ab1f into theskumar:master Apr 29, 2020
1 check passed
1 check passed
coverage/coveralls Coverage remained the same at 89.806%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.