All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Paul Eggleton : bitbake-layers: close files in apply_append()
  2012-01-10 17:49 Paul Eggleton : bitbake-layers: close files in apply_append() git
@ 2012-01-10 17:41 ` Chris Larson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Larson @ 2012-01-10 17:41 UTC (permalink / raw)
  To: git; +Cc: bitbake-devel

On Tue, Jan 10, 2012 at 10:49 AM,  <git@git.openembedded.org> wrote:
> Module: bitbake.git
> Branch: master
> Commit: 470a160813ce6cf04f83258d46ded5c2ab8bc520
> URL:    http://git.openembedded.org/?p=bitbake.git&a=commit;h=470a160813ce6cf04f83258d46ded5c2ab8bc520
>
> Author: Paul Eggleton <paul.eggleton@linux.intel.com>
> Date:   Sun Jan  8 12:06:51 2012 +0000
>
> bitbake-layers: close files in apply_append()
>
> 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>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Given we require 2.6, fyi, you could use the context manager.
-- 
Christopher Larson



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Paul Eggleton : bitbake-layers: close files in apply_append()
@ 2012-01-10 17:49 git
  2012-01-10 17:41 ` Chris Larson
  0 siblings, 1 reply; 2+ messages in thread
From: git @ 2012-01-10 17:49 UTC (permalink / raw)
  To: bitbake-devel

Module: bitbake.git
Branch: master
Commit: 470a160813ce6cf04f83258d46ded5c2ab8bc520
URL:    http://git.openembedded.org/?p=bitbake.git&a=commit;h=470a160813ce6cf04f83258d46ded5c2ab8bc520

Author: Paul Eggleton <paul.eggleton@linux.intel.com>
Date:   Sun Jan  8 12:06:51 2012 +0000

bitbake-layers: close files in apply_append()

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

---

 bin/bitbake-layers |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index b4c4127..b4cfd55 100755
--- a/bin/bitbake-layers
+++ b/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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-10 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 17:49 Paul Eggleton : bitbake-layers: close files in apply_append() git
2012-01-10 17:41 ` Chris Larson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.