mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 20:50:05 +00:00
logs
This commit is contained in:
@@ -266,12 +266,12 @@ class Templategen:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def path_is_template(path, debug=False):
|
def path_is_template(path, debug=False):
|
||||||
"""recursively check if any file is a template within path"""
|
"""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)
|
path = os.path.expanduser(path)
|
||||||
|
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
# does not exist
|
# does not exist
|
||||||
|
if debug:
|
||||||
|
LOG.dbg(f'is NOT template: \"{path}\"', force=True)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
@@ -285,12 +285,18 @@ class Templategen:
|
|||||||
# recursively explore directory
|
# recursively explore directory
|
||||||
if Templategen.path_is_template(fpath,
|
if Templategen.path_is_template(fpath,
|
||||||
debug=debug):
|
debug=debug):
|
||||||
|
if debug:
|
||||||
|
LOG.dbg(f'is indeed template: \"{path}\"', force=True)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
# check if file is a template
|
# check if file is a template
|
||||||
if Templategen._is_template(fpath,
|
if Templategen._is_template(fpath,
|
||||||
debug=debug):
|
debug=debug):
|
||||||
|
if debug:
|
||||||
|
LOG.dbg(f'is indeed template: \"{path}\"', force=True)
|
||||||
return True
|
return True
|
||||||
|
if debug:
|
||||||
|
LOG.dbg(f'is NOT template: \"{path}\"', force=True)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user