1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixes #22335: Adds filename extension to tempfile for Vault

This commit is contained in:
Reid Wahl 2017-08-26 18:47:58 -05:00 committed by Brian Coca
parent 1f962bd937
commit f787be3597

View file

@ -662,7 +662,8 @@ class VaultEditor:
existing_data=None, force_save=False, vault_id=None):
# Create a tempfile
fd, tmp_path = tempfile.mkstemp()
root, ext = os.path.splitext(os.path.realpath(filename))
fd, tmp_path = tempfile.mkstemp(suffix=ext)
os.close(fd)
try: