From 97850a5d933b4171c78a0cade20f3798c2b05d86 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 30 Jul 2023 22:34:34 +0200 Subject: [PATCH] logs --- dotdrop/templategen.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dotdrop/templategen.py b/dotdrop/templategen.py index 2584fb4..f848d08 100644 --- a/dotdrop/templategen.py +++ b/dotdrop/templategen.py @@ -266,12 +266,12 @@ class Templategen: @staticmethod def path_is_template(path, debug=False): """recursively check if any file is a template within path""" - if debug: - LOG.dbg(f'is template: {path}', force=True) path = os.path.expanduser(path) if not os.path.exists(path): # does not exist + if debug: + LOG.dbg(f'is NOT template: \"{path}\"', force=True) return False if os.path.isfile(path): @@ -285,12 +285,18 @@ class Templategen: # recursively explore directory if Templategen.path_is_template(fpath, debug=debug): + if debug: + LOG.dbg(f'is indeed template: \"{path}\"', force=True) return True else: # check if file is a template if Templategen._is_template(fpath, debug=debug): + if debug: + LOG.dbg(f'is indeed template: \"{path}\"', force=True) return True + if debug: + LOG.dbg(f'is NOT template: \"{path}\"', force=True) return False @staticmethod