mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-16 04:16:11 +00:00
adding decorator
This commit is contained in:
@@ -93,6 +93,7 @@ class Templategen:
|
|||||||
data = f.read()
|
data = f.read()
|
||||||
return data.decode('utf-8', 'replace')
|
return data.decode('utf-8', 'replace')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def is_template(path):
|
def is_template(path):
|
||||||
"""recursively check if any file is a template within path"""
|
"""recursively check if any file is a template within path"""
|
||||||
path = os.path.expanduser(path)
|
path = os.path.expanduser(path)
|
||||||
@@ -113,6 +114,7 @@ class Templategen:
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def _is_template(path):
|
def _is_template(path):
|
||||||
"""test if file pointed by path is a template"""
|
"""test if file pointed by path is a template"""
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
|
|||||||
Reference in New Issue
Block a user