Skip to content

Instantly share code, notes, and snippets.

@rferreira
Created February 6, 2014 14:47
Show Gist options
  • Select an option

  • Save rferreira/8845551 to your computer and use it in GitHub Desktop.

Select an option

Save rferreira/8845551 to your computer and use it in GitHub Desktop.
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