mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
pamd: add delete=False to NamedTemporaryFile() (#47281)
* add delete=False to NamedTemporaryFile and remove print statement from module * add changelog fragment
This commit is contained in:
parent
c5a9b6acb7
commit
c67ab296bb
2 changed files with 6 additions and 2 deletions
|
@ -776,9 +776,8 @@ def main():
|
|||
# First, create a backup if desired.
|
||||
if module.params['backup']:
|
||||
backupdest = module.backup_local(fname)
|
||||
print("BACKUP DEST", backupdest)
|
||||
try:
|
||||
temp_file = NamedTemporaryFile(mode='w', dir=module.tmpdir)
|
||||
temp_file = NamedTemporaryFile(mode='w', dir=module.tmpdir, delete=False)
|
||||
with open(temp_file.name, 'w') as fd:
|
||||
fd.write(str(service))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue