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

pamd: use module.tmpdir for NamedTemporaryFile() (#47133)

This commit is contained in:
Jonathan Davila 2018-10-18 02:09:07 -04:00 committed by Jordan Borean
parent 0c6513e9b1
commit d3be4f75ca

View file

@ -778,7 +778,7 @@ def main():
backupdest = module.backup_local(fname) backupdest = module.backup_local(fname)
print("BACKUP DEST", backupdest) print("BACKUP DEST", backupdest)
try: try:
temp_file = NamedTemporaryFile(mode='w') temp_file = NamedTemporaryFile(mode='w', dir=module.tmpdir)
with open(temp_file.name, 'w') as fd: with open(temp_file.name, 'w') as fd:
fd.write(str(service)) fd.write(str(service))