summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
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-03 13:13:29 +0100
commita8314b9531c82d8e9a33792af8a804da2ad2a8fb (patch)
tree865497e5d5509df80f1f68b139544a5d5ed41eb9 /scripts/combo-layer
parentf1e85d476030b83a748f0d70da5570e28dd8ac0d (diff)
downloadpoky-a8314b9531c82d8e9a33792af8a804da2ad2a8fb.tar.gz
combo-layer: python3: use tempfile.TemporaryFile
Used tempfile.TemporaryFile() API instead of deprecated os.tmpfile(). (From OE-Core rev: bf1b411eb1cd2cc960325d5fdb0cb4f4f7b1e40e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-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):
185 """ 185 """
186 logger.debug("run cmd '%s' in %s" % (cmd, os.getcwd() if destdir is None else destdir)) 186 logger.debug("run cmd '%s' in %s" % (cmd, os.getcwd() if destdir is None else destdir))
187 if not out: 187 if not out:
188 out = os.tmpfile() 188 out = tempfile.TemporaryFile()
189 err = out 189 err = out
190 else: 190 else:
191 err = os.tmpfile() 191 err = tempfile.TemporaryFile()
192 try: 192 try:
193 subprocess.check_call(cmd, stdout=out, stderr=err, cwd=destdir, shell=isinstance(cmd, str), env=env or os.environ) 193 subprocess.check_call(cmd, stdout=out, stderr=err, cwd=destdir, shell=isinstance(cmd, str), env=env or os.environ)
194 except subprocess.CalledProcessError as e: 194 except subprocess.CalledProcessError as e: