1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-11 13:09:18 +00:00

add profile to all other variables

This commit is contained in:
deadc0de6
2019-02-02 19:20:33 +01:00
parent e67df9f648
commit 45f29679b2
5 changed files with 13 additions and 12 deletions

View File

@@ -23,7 +23,7 @@ COMMENT_END = '@@#}'
class Templategen:
def __init__(self, profile='', base='.', variables={}, debug=False):
def __init__(self, base='.', variables={}, debug=False):
self.base = base.rstrip(os.sep)
self.debug = debug
self.log = Logger()
@@ -39,8 +39,6 @@ class Templategen:
comment_end_string=COMMENT_END)
# adding variables
self.env.globals['env'] = os.environ
if profile:
self.env.globals['profile'] = profile
self.env.globals.update(variables)
# adding header method
self.env.globals['header'] = self._header