Added 'decode()' to template string from marathon 'decribe()' call.

Without this decoding, the stream of bytes returned from the marathon
describe call were being interpreted as a 'collection.Sequence' in the
subsequent 'emitter.publish()' call. This was causing the subesequnt
JSON encoding to blow up since it was interpeting it as the wrong type.
This commit is contained in:
Kevin Klues
2017-06-19 21:08:07 -07:00
parent 6ec07dfa53
commit 9be20d45f1

View File

@@ -285,7 +285,7 @@ def _describe(package_name,
if render:
app_output = pkg.marathon_json(user_options)
else:
app_output = pkg.marathon_template()
app_output = pkg.marathon_template().decode("UTF-8")
if app_output and app_output[-1] == '\n':
app_output = app_output[:-1]
emitter.publish(app_output)