[bitbake-devel] [PATCH] tinfoil.py: validate argument in parse_recipe_file

Bystricky, Juro juro.bystricky at intel.com
Thu Apr 6 15:15:21 UTC 2017


parse_recipe can be called from parse_recipe_file as well. If parse_recipe_file is called with a non-existing recipe, you end up with the exception as well. IMHO for a  non-existent recipe parse_recipe should return None (instead of an exception)


________________________________
From: Christopher Larson [kergoth at gmail.com]
Sent: Wednesday, April 05, 2017 6:32 PM
To: Bystricky, Juro
Cc: bitbake-devel at lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] tinfoil.py: validate argument in parse_recipe_file


On Wed, Apr 5, 2017 at 2:33 PM, Juro Bystricky <juro.bystricky at intel.com<mailto:juro.bystricky at intel.com>> wrote:
Check for an empty file name to avoid an exception.

[YOCTO#11210]

Signed-off-by: Juro Bystricky <juro.bystricky at intel.com<mailto:juro.bystricky at intel.com>>

IMO this is pointless. If you’re calling parse_recipe_file with an empty string, it’s programmer error, which means raising an exception is a completely reasonable thing to do.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20170406/d135f294/attachment-0002.html>


More information about the bitbake-devel mailing list