This commit is contained in:
yumoqing 2022-09-14 10:08:50 +08:00
parent fc6b4df94e
commit 58a79e2602
3 changed files with 6 additions and 7 deletions

View File

@ -110,10 +110,7 @@ class Blocks(EventDispatcher):
self.register_event_type('on_failed')
self.env = GlobalEnv()
config = getConfig()
if config.script_root:
self.script = Script(config.script_root)
else:
self.script = Script(config.workdir)
self.script = Script()
def set(self, k:str, v):
self.env[k] = v

View File

@ -23,8 +23,10 @@ def set_script_env(n,v):
env.update({n:v})
class Script:
def __init__(self, root):
self.root = root
def __init__(self):
config = getConfig()
self.root = config.script_root
print('Script.root=', self.root)
self.env = {}
self.handlers = {}
self.register('.tmpl', TemplateHandler)

View File

@ -1 +1 @@
__version__ = '0.3.9'
__version__ = '0.3.10'