def _prepScript (self):
"""
Build the script, interpret the placeholders
"""
script = self.proc.script.render(self.data)
write = True
if path.exists (self.script):
f = open (self.script)
prevscript = f.read()
f.close()
# no change to happen? script change will cause a different uid for a proc
if prevscript == script:
write = False
self.proc.log ("Script file exists: %s" % self.script, 'debug', 'SCRIPT_EXISTS')
if write:
with open (self.script, 'w') as f:
f.write (script)
评论列表
文章目录