Cannot use merge_configs module in python3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Kolla-ansible is unusable in python3 since this commit https:/
ansible/
try:
result_file = os.path.
with open(result_file, 'wb') as f:
It result with this error :
The full traceback is:
Traceback (most recent call last):
File "/Users/
res = self._execute()
File "/Users/
result = self._handler.
File "/Users/
f.write(
TypeError: a bytes-like object is required, not 'str'
As we are using six.StringIO for creating the file, I think we can use this code instead :
result_file = os.path.
with open(result_file, 'w') as f:
Reviewed: https:/ /review. openstack. org/643479 /git.openstack. org/cgit/ openstack/ kolla-ansible/ commit/ ?id=85f7da97929 4d5bc18c6045465 d2955945be3109
Committed: https:/
Submitter: Zuul
Branch: master
commit 85f7da979294d5b c18c6045465d295 5945be3109
Author: Victor Coutellier <email address hidden>
Date: Thu Mar 14 23:33:08 2019 +0100
Fix action_plugins python3 compatibility
Fix filemode in the merge_configs and merge_yaml action plugin to
be compatible with python3
Change-Id: Ief64c5bdcd7171 41281e23c255a49 ec02a96aef2
Closes-Bug: #1820134