[oe-commits] [openembedded-core] 14/19: scripts: python3: rename file -> open

git at git.openembedded.org git at git.openembedded.org
Fri May 20 09:30:44 UTC 2016


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

commit d55b8c82b4561a97a17b873e95b0854f21541d6a
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Fri May 20 01:34:25 2016 +0300

    scripts: python3: rename file -> open
    
    file API doesn't exist in python 3.
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 meta/lib/oe/tests/test_path.py                  | 2 +-
 scripts/contrib/python/generate-manifest-2.7.py | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py | 2 +-
 scripts/swabber-strace-attach                   | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oe/tests/test_path.py b/meta/lib/oe/tests/test_path.py
index 5aa024d..44d0681 100644
--- a/meta/lib/oe/tests/test_path.py
+++ b/meta/lib/oe/tests/test_path.py
@@ -55,7 +55,7 @@ class TestRealPath(unittest.TestCase):
         for d in self.DIRS:
             os.mkdir(os.path.join(self.root, d))
         for f in self.FILES:
-            file(os.path.join(self.root, f), "w")
+            open(os.path.join(self.root, f), "w")
         for l in self.LINKS:
             os.symlink(l[1], os.path.join(self.root, l[0]))
 
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py
index f86a990..f2ecf8d 100755
--- a/scripts/contrib/python/generate-manifest-2.7.py
+++ b/scripts/contrib/python/generate-manifest-2.7.py
@@ -153,7 +153,7 @@ if __name__ == "__main__":
             os.unlink(sys.argv[1])
         except Exception:
             sys.exc_clear()
-        outfile = file( sys.argv[1], "w" )
+        outfile = open( sys.argv[1], "w" )
     else:
         outfile = sys.stdout
 
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
index 828eb29..e04da1d 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -156,7 +156,7 @@ if __name__ == "__main__":
             os.unlink(sys.argv[1])
         except Exception:
             sys.exc_clear()
-        outfile = file( sys.argv[1], "w" )
+        outfile = open( sys.argv[1], "w" )
     else:
         outfile = sys.stdout
 
diff --git a/scripts/swabber-strace-attach b/scripts/swabber-strace-attach
index bb0391a..f258987 100755
--- a/scripts/swabber-strace-attach
+++ b/scripts/swabber-strace-attach
@@ -16,8 +16,8 @@ else:
     sys.exit()
 
 
-si = file(os.devnull, 'r')
-so = file(sys.argv[2], 'w')
+si = open(os.devnull, 'r')
+so = open(sys.argv[2], 'w')
 se = so
 
 # Replace those fds with our own

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


More information about the Openembedded-commits mailing list