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

(#5822) Use mkstemp to open a temporary file (as NamedTemporaryFile doesn't take a delete argument in Python < 2.6)

This commit is contained in:
Michael Porter 2014-01-30 19:39:39 -05:00
parent a1afd6987c
commit 8ccbf13a13

View file

@ -142,8 +142,8 @@ import re
import tempfile
def write_ssh_wrapper():
fh = tempfile.NamedTemporaryFile(delete=False)
wrapper_path = fh.name
fd, wrapper_path = tempfile.mkstemp()
fh = os.fdopen(fd, 'w+b')
template = """#!/bin/sh
if [ -z "$GIT_SSH_OPTS" ]; then
BASEOPTS=""