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

read_envfile() recurses up the dir tree if path given, but file not found #33

Open
arteme opened this issue Mar 8, 2019 · 0 comments
Open

Comments

@arteme
Copy link

arteme commented Mar 8, 2019

When using read_envfile with path defined, the function still recurses up the directory tree if the given path is not found.

Consider the following code:

import envparse
envparse.env.read_envfile('myenv.conf')

The app runs from /home/test/code, which doesn't have myenv.conf file. The following debug log:

DEBUG:envfile not found at myenv.conf, looking in parent dir.
DEBUG:envfile not found at /home/test/myenv.conf, looking in parent dir.
DEBUG:envfile not found at /home/myenv.conf, looking in parent dir.
DEBUG:envfile not found at /myenv.conf, looking in parent dir.
UserWarning: Could not any envfile.

This is contrary to the documentation of the function. The function should not recurse if path is given, but file missing, or if it does this needs to be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant