Skip to content

Commit

Permalink
Add logging to paths module
Browse files Browse the repository at this point in the history
  • Loading branch information
Pidgeot committed Sep 17, 2022
1 parent 1edbf5c commit 9c694e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import print_function, unicode_literals, absolute_import

import os
from . import log

__paths = {}

Expand Down Expand Up @@ -40,6 +41,7 @@ def register(name, *path_elms, **kwargs):
*path_elms[:-1]), path_elms[-1])
else:
__paths[name] = path_elms[0]
log.i('Registering path %s as %s', name, __paths[name])
if kwargs.get('allow_create', True) and not os.path.exists(__paths[name]):
os.makedirs(__paths[name])

Expand Down

0 comments on commit 9c694e4

Please sign in to comment.