Skip to content

Commit

Permalink
check log directory before attempting to create it
Browse files Browse the repository at this point in the history
  • Loading branch information
bartek-k committed Nov 29, 2016
1 parent 4d70189 commit 0faa90b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion messente/logging.py
Expand Up @@ -47,7 +47,7 @@ def __init__(self, name=None, **kwargs):
log_file = kwargs.pop("log_file", None)
if log_file:
d = os.path.dirname(log_file)
if not os.path.isdir(d):
if d and not os.path.isdir(d):
os.makedirs(d)
handlers.append(logging.FileHandler(log_file))

Expand Down

0 comments on commit 0faa90b

Please sign in to comment.