summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-06-02 13:13:01 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 11:49:30 +0100
commitbf1b411eb1cd2cc960325d5fdb0cb4f4f7b1e40e (patch)
treed9f4e3e4725be91fe80b865845bcfff9ec5073f9 /scripts
parent391cd33720e7d7e8e261193199272739293ad881 (diff)
downloadopenembedded-core-bf1b411eb1cd2cc960325d5fdb0cb4f4f7b1e40e.tar.gz
openembedded-core-bf1b411eb1cd2cc960325d5fdb0cb4f4f7b1e40e.tar.bz2
openembedded-core-bf1b411eb1cd2cc960325d5fdb0cb4f4f7b1e40e.zip
combo-layer: python3: use tempfile.TemporaryFile
Used tempfile.TemporaryFile() API instead of deprecated os.tmpfile(). Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/combo-layer4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 0954bb6850..36a8f5fa1e 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -185,10 +185,10 @@ def runcmd(cmd,destdir=None,printerr=True,out=None,env=None):
"""
logger.debug("run cmd '%s' in %s" % (cmd, os.getcwd() if destdir is None else destdir))
if not out:
- out = os.tmpfile()
+ out = tempfile.TemporaryFile()
err = out
else:
- err = os.tmpfile()
+ err = tempfile.TemporaryFile()
try:
subprocess.check_call(cmd, stdout=out, stderr=err, cwd=destdir, shell=isinstance(cmd, str), env=env or os.environ)
except subprocess.CalledProcessError as e: