<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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)<br>
<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF863652" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>From:</b> Christopher Larson [kergoth@gmail.com]<br>
<b>Sent:</b> Wednesday, April 05, 2017 6:32 PM<br>
<b>To:</b> Bystricky, Juro<br>
<b>Cc:</b> bitbake-devel@lists.openembedded.org<br>
<b>Subject:</b> Re: [bitbake-devel] [PATCH] tinfoil.py: validate argument in parse_recipe_file<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 5, 2017 at 2:33 PM, Juro Bystricky <span dir="ltr">
<<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div id=":o4" class="a3s aXjCH m15b400977f39b78d">Check for an empty file name to avoid an exception.<br>
<br>
[YOCTO#11210]<br>
<br>
Signed-off-by: Juro Bystricky <<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>></div>
</blockquote>
</div>
<div class="gmail_extra"><br>
</div>
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.<br>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Christopher Larson<br>
kergoth at gmail dot com<br>
Founder - BitBake, OpenEmbedded, OpenZaurus<br>
Senior Software Engineer, Mentor Graphics</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>