Skip to content

Commit

Permalink
fix debug setting value.
Browse files Browse the repository at this point in the history
  • Loading branch information
djudman committed Sep 14, 2019
1 parent 3f26d3d commit 0629308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evernotebot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def load_config():
value = os.getenv(name, defaults.get(name))
if value is None:
raise Exception(f"Environment variable `{name}` isn't set")
if not isinstance(value, str):
value = str(value).lower()
value = value or ''
config_str_data = config_str_data.replace(f'${{{name}}}', value)
config = json.loads(config_str_data)
config['debug'] = bool(config['debug'])
filepath = join(dirpath, config['logging']['handlers']['evernotebot']['filename'])
logdir = dirname(filepath)
if not exists(logdir):
Expand Down

0 comments on commit 0629308

Please sign in to comment.