From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] class/lib: Fix up various file access methods
Date: Thu, 09 May 2013 17:43:21 +0100 [thread overview]
Message-ID: <1368117801.27116.106.camel@ted> (raw)
In-Reply-To: <20130509161916.GF3188@jama>
On Thu, 2013-05-09 at 18:19 +0200, Martin Jansa wrote:
> On Thu, May 09, 2013 at 05:05:58PM +0100, Richard Purdie wrote:
> > 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>
> > ---
> > diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass
> > index 63ba087..c30d1cb 100644
> > --- a/meta/classes/imagetest-qemu.bbclass
> > +++ b/meta/classes/imagetest-qemu.bbclass
> > @@ -146,6 +146,7 @@ def qemuimagetest_main(d):
> > if not os.path.isfile(fulltestcase):
> > raise bb.build.FuncFailed("Testcase %s not found" % fulltestcase)
> > list.append((item, casefile, fulltestcase))
> > + f.close()
>
> indentation looks wrong and the same a line above "raise.."
Its an existing issue with the file, this patch is correct but I've sent
out a separate patch fixing it.
Cheers,
Richard
prev parent reply other threads:[~2013-05-09 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 16:05 [PATCH] class/lib: Fix up various file access methods Richard Purdie
2013-05-09 16:19 ` Martin Jansa
2013-05-09 16:43 ` Richard Purdie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368117801.27116.106.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.