[oe-commits] [openembedded-core] 41/43: combo-layer: python3: use tempfile.TemporaryFile

git at git.openembedded.org git at git.openembedded.org
Thu Jun 2 10:52:05 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit bf1b411eb1cd2cc960325d5fdb0cb4f4f7b1e40e
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Thu Jun 2 13:13:01 2016 +0300

    combo-layer: python3: use tempfile.TemporaryFile
    
    Used tempfile.TemporaryFile() API instead of deprecated
    os.tmpfile().
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/combo-layer | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/combo-layer b/scripts/combo-layer
index 0954bb6..36a8f5f 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list