container_puppet_config: python3 fix
Python3 returns an error if we write the file in text. We need to write in binary. Closes-Bug: #1863352 Change-Id: Ief80c917803c2143e459a74079159d958d18f153
This commit is contained in:
parent
6cfc382961
commit
05a9daa46f
|
@ -412,7 +412,7 @@ class ContainerPuppetManager:
|
|||
:param path: string
|
||||
:param config: string
|
||||
"""
|
||||
f = open(path, 'w')
|
||||
f = open(path, 'wb')
|
||||
f.write(json.dumps(config, indent=2).encode('utf-8'))
|
||||
os.chmod(path, 0o600)
|
||||
|
||||
|
|
Loading…
Reference in New Issue