From 4a081b5a52e3d27da8d4b062f3fda292e8d8fb0a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 9 May 2013 21:06:45 +0000 Subject: bitbake: lib: Clean up various file access syntax Python 3 is stricter about how files are accessed. Specficially: * Use open(), not file() * Use binary mode for binary files (when checksumming) * Use with statements to ensure files get closed * Add missing file close statements (Bitbake rev: 9f08b901375ba640f47596f1bcf43f98a931550f) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 3255c8beb8..7d4a5b14a7 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -145,6 +145,8 @@ def handle(fn, data, include): if oldfile: data.setVar('FILE', oldfile) + f.close() + for f in confFilters: f(fn, data) -- cgit 1.2.3-korg