Don't try to create a directory from an empty string
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user