* [PATCH] fetch2/wget: Fix horrible temp file handling
@ 2014-12-23 12:32 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-12-23 12:32 UTC (permalink / raw)
To: bitbake-devel
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>
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 2e6da48..b081b76 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/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):
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-23 12:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 12:32 [PATCH] fetch2/wget: Fix horrible temp file handling Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.