Created
February 6, 2014 14:47
-
-
Save rferreira/8845551 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if jackfruit.config is None: | |
| if path is None: | |
| # making sure the main config is loaded: | |
| if not CONFIG_ENV_VAR in os.environ: | |
| print('##############################################################') | |
| print('config discovery failed, looked for "%s"' % CONFIG_ENV_VAR) | |
| print('##############################################################') | |
| sys.exit(2) | |
| path = os.environ[CONFIG_ENV_VAR] | |
| print('loaded config path from environment variable: %s' % path) | |
| with open(path) as fd: | |
| jackfruit.config = json.loads(fd.read()) | |
| # configure logging | |
| logging.config.dictConfig(jackfruit.config.get('logging', {})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment