From de587a9ccbaf140c556aac457e0179f37391b74e Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Mon, 13 Jun 2016 10:43:46 -0500 Subject: [PATCH] Correct usage of tempfile The stdlib module is tempfile not tempdir ;-) --- flake8/main/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake8/main/git.py b/flake8/main/git.py index 61312d4..c24f294 100644 --- a/flake8/main/git.py +++ b/flake8/main/git.py @@ -9,7 +9,7 @@ import os import shutil import stat import subprocess -import tempdir +import tempfile from flake8 import defaults from flake8 import exceptions @@ -144,7 +144,7 @@ def get_staged_contents_from(filename): @contextlib.contextmanager def make_temporary_directory(): - temporary_directory = tempdir.mkdtemp() + temporary_directory = tempfile.mkdtemp() yield temporary_directory shutil.rmtree(temporary_directory, ignore_errors=True)