Don't try to create a directory from an empty string

This commit is contained in:
Calen Pennington
2016-11-10 13:47:38 -05:00
parent a207080897
commit f5f64c03fc

View File

@@ -63,8 +63,9 @@ def timed(wrapped, instance, args, kwargs): # pylint: disable=unused-argument
log_message.update(exception_info)
try:
if not exists(dirname(log_path)):
os.makedirs(dirname(log_path))
log_dir = dirname(log_path)
if log_dir and not exists(log_dir):
os.makedirs(log_dir)
with open(log_path, 'a') as outfile:
json.dump(