fix a py3 compat issue in the insights action plugin

This commit is contained in:
Ryan Petrello 2019-04-01 08:47:38 -04:00
parent 7b16931658
commit 52a2ed2786
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -12,7 +12,7 @@ class ActionModule(ActionBase):
def save_playbook(self, proj_path, plan, content):
fname = '{}-{}.yml'.format(plan.get('name', None) or 'insights-plan', plan['maintenance_id'])
file_path = os.path.join(proj_path, fname)
with open(file_path, 'w') as f:
with open(file_path, 'wb') as f:
f.write(content)
def is_stale(self, proj_path, etag):