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

Print warning on malformed lines in .env file #211

Merged
merged 2 commits into from Jan 13, 2020

Conversation

@bbc2
Copy link
Collaborator

@bbc2 bbc2 commented Nov 3, 2019

This prints a warning such as the following on stderr (logging.warning) when part of the .env file can't be parsed:

Python-dotenv could not parse statement starting at line 2

I think it's OK to use the "warning" level because such an error means that something should be fixed by the user.

Note that Python-dotenv will continue to parse the file and won't interfere in any other way with the application using it.

I've also added some commits to fix the CI (linting in the code and the manifest).

Fixes #204

@bbc2 bbc2 requested a review from theskumar Nov 3, 2019
@bbc2 bbc2 force-pushed the bbc2:invalid-dotenv-warnings branch from 9bd5339 to 4d8aa19 Nov 3, 2019
@coveralls
Copy link

@coveralls coveralls commented Nov 3, 2019 •

Coverage Status

Coverage decreased (-3.4%) to 84.461% when pulling e850e21 on bbc2:invalid-dotenv-warnings into 3576225 on theskumar:master.

@bbc2
Copy link
Collaborator Author

@bbc2 bbc2 commented Dec 17, 2019

@theskumar Hi! I understand you might not have a lot of time to review code. Do you mind if I go ahead and merge this and other PRs without review?

bbc2 added 2 commits Nov 1, 2019
If a line can't be parsed (e.g. `FOO: BAR` is invalid), it is printed as
a warning on stderr.

As usual, after such an error, Python-dotenv tries to parse the rest of
the file and the application can use the successfully parsed variable
bindings.
@bbc2 bbc2 force-pushed the bbc2:invalid-dotenv-warnings branch from 4d8aa19 to e850e21 Dec 21, 2019
@theskumar
Copy link
Owner

@theskumar theskumar commented Jan 13, 2020

@bbc2 Due to some personal commitments I'm not able to pay as much attention to this project as it deserves. I won't like to hold onto any requests due to my unavailability. Please feel free to merge without my review if you are confident about it :)

Copy link
Owner

@theskumar theskumar left a comment

Ship it!!

@bbc2 bbc2 merged commit 723809f into theskumar:master Jan 13, 2020
1 of 2 checks passed
1 of 2 checks passed
coverage/coveralls Coverage decreased (-3.4%) to 84.461%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bbc2 bbc2 deleted the bbc2:invalid-dotenv-warnings branch Jan 13, 2020
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.

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