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

Configuration via environment variables #7

Merged
merged 5 commits into from
Jan 4, 2016

Conversation

markunsworth
Copy link
Contributor

Added ability to use environment variables before falling back to using a config file

@@ -40,7 +40,7 @@ def get_config(config_file_path=None):
Returns a dictionary with all the possible configuration options,
with None for the options that were not provided.
"""
if not os.path.isfile(config_file_path):
if os.path.isfile(config_file_path):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces a bug - it'll raise a ConfigFileNotFoundException in the case where a config file is present. Please revert this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. I was taking a different approach originally and must have forgotten to revert this part

@abh1nav
Copy link
Owner

abh1nav commented Nov 17, 2015

@markunsworth awesome, that looks good to me. Could you make a copy of this and include it as a part of this pull request? Once that's done, I'll get the changes merged and push it out via PyPI.

Thanks Mark!

abh1nav added a commit that referenced this pull request Jan 4, 2016
@abh1nav abh1nav merged commit f7e07aa into abh1nav:master Jan 4, 2016
@markunsworth markunsworth deleted the feature/environment_based_config branch October 3, 2016 10:45
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

Successfully merging this pull request may close these issues.

2 participants