[OE-core] [PATCH] populate SDK: prepare calling of bb.utils for exceptions
Benjamin Esquivel
benjamin.esquivel at linux.intel.com
Fri Oct 16 20:18:57 UTC 2015
On Fri, 2015-10-16 at 11:01 +0100, Richard Purdie wrote:
> On Thu, 2015-10-15 at 12:27 -0500, Benjamin Esquivel wrote:
> > + if (bb.utils.movefile(sourcefile, destdir) == None):
> > + raise Exception("moving {} to {} failed".format(
> > + sourcefile, destdir))
>
> Its a minor issue, however rightly or wrongly, the vast majority of
> the
> code base uses "xxx %s %s" % (var, var2) instead of .format(). Is
> there
> a reason we should be using the latter as for consistency, the former
> would seem to make things more standardised?
>
No other reason than .format being pythonic and % being an old way of
string formatting. I can move this to % instead on the grounds of
standardizing.
> Cheers,
>
> Richard
>
>
>
More information about the Openembedded-core
mailing list