mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
fix a bug preventing custom credential templates from including unicode
see: https://github.com/ansible/tower/issues/1266
This commit is contained in:
@@ -632,7 +632,7 @@ class CredentialType(CommonModelNameNotUnique):
|
||||
data = Template(file_tmpl).render(**namespace)
|
||||
_, path = tempfile.mkstemp(dir=private_data_dir)
|
||||
with open(path, 'w') as f:
|
||||
f.write(data)
|
||||
f.write(data.encode('utf-8'))
|
||||
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR)
|
||||
|
||||
# determine if filename indicates single file or many
|
||||
|
||||
Reference in New Issue
Block a user