aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/libc-package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 17:05:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 22:25:31 +0100
commita43e0a8ecd0441131e929daf998c3cd454d9c8f3 (patch)
tree69be538a129e3f9e985aa65d07005bf067371aa5 /meta/classes/libc-package.bbclass
parent4808629faa1222b31f92a3e410e06adb8e081293 (diff)
downloadopenembedded-core-a43e0a8ecd0441131e929daf998c3cd454d9c8f3.tar.gz
class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch cleans some of them up, specifically: * Remove pointless "from __builtin__ import file" * Use open(), not file() * Wrap file usage in a with container to ensure files are closed * Add missing .close() calls in some cases Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/libc-package.bbclass')
-rw-r--r--meta/classes/libc-package.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 3a131540f3..74e2078544 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -146,7 +146,7 @@ python package_do_split_gconvs () {
def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
deps = []
- f = open(fn, "r")
+ f = open(fn, "rb")
c_re = re.compile('^copy "(.*)"')
i_re = re.compile('^include "(\w+)".*')
for l in f.readlines():
@@ -167,7 +167,7 @@ python package_do_split_gconvs () {
def calc_charmap_deps(fn, pkg, file_regex, output_pattern, group):
deps = []
- f = open(fn, "r")
+ f = open(fn, "rb")
c_re = re.compile('^copy "(.*)"')
i_re = re.compile('^include "(\w+)".*')
for l in f.readlines():
@@ -187,7 +187,7 @@ python package_do_split_gconvs () {
def calc_locale_deps(fn, pkg, file_regex, output_pattern, group):
deps = []
- f = open(fn, "r")
+ f = open(fn, "rb")
c_re = re.compile('^copy "(.*)"')
i_re = re.compile('^include "(\w+)".*')
for l in f.readlines():