]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer: python3: use tempfile.TemporaryFile
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 2 Jun 2016 10:13:01 +0000 (13:13 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jun 2016 10:49:30 +0000 (11:49 +0100)
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>
scripts/combo-layer

index 0954bb6850645df4040fda193e18cbc59beee8b5..36a8f5fa1e62536bd4bc765ce7cb979590fadf6b 100755 (executable)
@@ -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: