[bitbake-devel,3/3] bitbake-layers: close files in apply_append()

Submitted by Paul Eggleton on Jan. 8, 2012, 12:06 p.m.

Details

Message ID ed8b9e7f2cfdc88cb692148a61a9c13663329388.1326023910.git.paul.eggleton@linux.intel.com
State Accepted, archived
Headers show

Commit Message

Paul Eggleton Jan. 8, 2012, 12:06 p.m.
It's recommended practice to close files when finished with them and the
code in this function was not doing this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake-layers |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index b4c4127..b4cfd55 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -307,6 +307,8 @@  build results (as the layer priority order has effectively changed).
         recipefile.write('\n')
         recipefile.write('##### bbappended from %s #####\n' % self.get_append_layer(appendname))
         recipefile.writelines(appendfile.readlines())
+        recipefile.close()
+        appendfile.close()
 
     def do_show_appends(self, args):
         """list bbappend files and recipe files they apply to