diff options
| author | Victor Coutellier <victor.coutellier@gmail.com> | 2019-03-14 23:33:08 +0100 |
|---|---|---|
| committer | Victor Coutellier <victor.coutellier@gmail.com> | 2019-03-14 23:39:26 +0100 |
| commit | 85f7da979294d5bc18c6045465d2955945be3109 (patch) | |
| tree | a1d1ed9a7e33f6ae52baeae7771c12ea465e0d27 | |
| parent | e35c32c0d7805555ffcf597b538ef2f59341adb6 (diff) | |
| download | kolla-ansible-85f7da979294d5bc18c6045465d2955945be3109.tar.gz kolla-ansible-85f7da979294d5bc18c6045465d2955945be3109.zip | |
Fix action_plugins python3 compatibility
Fix filemode in the merge_configs and merge_yaml action plugin to
be compatible with python3
Change-Id: Ief64c5bdcd717141281e23c255a49ec02a96aef2
Closes-Bug: #1820134
| -rw-r--r-- | ansible/action_plugins/merge_configs.py | 2 | ||||
| -rwxr-xr-x | ansible/action_plugins/merge_yaml.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ansible/action_plugins/merge_configs.py b/ansible/action_plugins/merge_configs.py index 12b323451..b58d6d7ac 100644 --- a/ansible/action_plugins/merge_configs.py +++ b/ansible/action_plugins/merge_configs.py @@ -176,7 +176,7 @@ class ActionModule(action.ActionBase): try: result_file = os.path.join(local_tempdir, 'source') - with open(result_file, 'wb') as f: + with open(result_file, 'w') as f: f.write(full_source) new_task = self._task.copy() diff --git a/ansible/action_plugins/merge_yaml.py b/ansible/action_plugins/merge_yaml.py index 75f49d506..bf974050c 100755 --- a/ansible/action_plugins/merge_yaml.py +++ b/ansible/action_plugins/merge_yaml.py @@ -121,7 +121,7 @@ class ActionModule(action.ActionBase): try: result_file = os.path.join(local_tempdir, 'source') - with open(result_file, 'wb') as f: + with open(result_file, 'w') as f: f.write(dump(output, default_flow_style=False)) new_task = self._task.copy() |
