mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 18:49:33 +02:00
meta/scripts: python3: rename file -> open
file() API doesn't exist in python 3, convert to open(). Also handle some cases where files aren't closed. Compatible with python 2.7. [Contributions from Ed and Richard] (From OE-Core rev: 0f4ec13e11bb8abe21aba2a28547dfb9372bc377) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user