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

reviewable/pr18780/r1
Michael Porter 11 years ago
parent f16f2f23f5
commit 6f685e45dc

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

Loading…
Cancel
Save