v1 execution plan template processing was fixed

In v1 execution plans Scripts section must contain a list
of base64-encoded files. But instead of a file content,
the file path was encoded.

Change-Id: Ibb45de6dd2895a308000d083e0603020502d3b0d
Closes-Bug: #1657839
This commit is contained in:
Stan Lagun 2017-01-19 11:55:15 -08:00
parent 2975a7d9e7
commit c657ffce4d
1 changed files with 3 additions and 2 deletions

View File

@ -224,8 +224,9 @@ class Agent(object):
scripts = []
for script in script_files:
script_path = os.path.join(scripts_folder, script)
script_path = base64.encode_as_text(script_path) + "\n"
scripts.append(resources.string(script_path, binary=True))
scripts.append(base64.encode_as_text(
resources.string(script_path, binary=True),
encoding='latin1'))
template['Scripts'] = scripts
return template