From 8ccbf13a133f2665117263e55336751b44f6ff9c Mon Sep 17 00:00:00 2001 From: Michael Porter Date: Thu, 30 Jan 2014 19:39:39 -0500 Subject: [PATCH] (#5822) Use `mkstemp` to open a temporary file (as NamedTemporaryFile doesn't take a `delete` argument in Python < 2.6) --- library/source_control/git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/source_control/git b/library/source_control/git index 768e315788a..2eb2add1857 100644 --- a/library/source_control/git +++ b/library/source_control/git @@ -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=""