aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-23 12:32:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-23 12:35:06 +0000
commit10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e (patch)
tree935bfd66d85da9e4dde67a10d89101bee8cd6cbb /lib/bb/fetch2/wget.py
parent16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e (diff)
downloadbitbake-10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e.tar.gz
fetch2/wget: Fix horrible temp file handling
Hardcoding a temp directory is bad practice and leads to races between the tests. There is no longer any good reason for doing this, drop it and ensure the files get cleaned up correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/wget.py')
-rw-r--r--lib/bb/fetch2/wget.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 2e6da4827..b081b7621 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -174,7 +174,7 @@ class Wget(FetchMethod):
"""
Run fetch checkstatus to get directory information
"""
- f = tempfile.NamedTemporaryFile(dir="/tmp/s/", delete=False)
+ f = tempfile.NamedTemporaryFile()
agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12"
fetchcmd = self.basecmd
@@ -186,7 +186,6 @@ class Wget(FetchMethod):
fetchresult = ""
f.close()
- # os.unlink(f.name)
return fetchresult
def _check_latest_dir(self, url, versionstring, ud, d):