From: Zac Medico Date: Tue, 2 Mar 2010 21:24:24 +0000 (-0000) Subject: Move imports to top. X-Git-Tag: v2.2_rc64~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48684e5f96c47d3bdd2e74834bf564e6f9154116;p=portage.git Move imports to top. svn path=/main/trunk/; revision=15715 --- diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py index c9de18708..b89856e6e 100644 --- a/pym/portage/package/ebuild/fetch.py +++ b/pym/portage/package/ebuild/fetch.py @@ -14,6 +14,7 @@ import re import shutil import stat import sys +import tempfile import portage @@ -139,8 +140,8 @@ def _checksum_failure_temp_file(distdir, basename): os.unlink(filename) return temp_filename - from tempfile import mkstemp - fd, temp_filename = mkstemp("", basename + "._checksum_failure_.", distdir) + fd, temp_filename = \ + tempfile.mkstemp("", basename + "._checksum_failure_.", distdir) os.close(fd) os.rename(filename, temp_filename) return temp_filename @@ -1063,9 +1064,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", # Use a temporary config instance to avoid altering # the state of the one that's been passed in. mysettings = config(clone=mysettings) - from tempfile import mkdtemp try: - private_tmpdir = mkdtemp("", "._portage_fetch_.", + private_tmpdir = tempfile.mkdtemp("", "._portage_fetch_.", global_tmpdir) except OSError as e: if e.errno != PermissionDenied.errno: