<html><head></head><body><div>On Fri, 2015-09-18 at 12:05 +0100, Burton, Ross wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 17 September 2015 at 21:38, Benjamin Esquivel <span dir="ltr">&lt;<a href="mailto:benjamin.esquivel@linux.intel.com" target="_blank">benjamin.esquivel@linux.intel.com</a>&gt;</span> wrote:<br><blockquote type="cite"><div id=":bf" class="a3s" style="overflow:hidden">put the import of pexpect around a try statement so it can tell you<br>
why it failed to import when in a system that has the module unreachable<br></div><br></blockquote></div><br>As the failing import is throwing an exception, can't the calling code display the exception correctly?</div></div></blockquote><div>This is the logging without the change:</div><div>2015-09-18 08:27:44,233 - selftest - INFO - Loading tests from: oeqa.selftest.buildhistory</div><div>2015-09-18 08:27:44,234 - selftest - INFO - Loading tests from: oeqa.selftest.buildoptions</div><div>2015-09-18 08:27:44,236 - selftest - ERROR - Failed to import oeqa.selftest.buildoptions</div><div>2015-09-18 08:27:44,236 - selftest - ERROR - 'module' object has no attribute 'buildoptions'</div><div><br></div><div>This is the logging with the proposed change and including Paul's comment:</div><div><br></div><div>2015-09-18 08:27:44,233 - selftest - INFO - Loading tests from: oeqa.selftest.buildhistory</div><div>2015-09-18 08:27:44,234 - selftest - INFO - Loading tests from: oeqa.selftest.buildoptions</div><div>No module named pexpect, import failed</div><div>Please install pexpect (python-pexpect)</div><div>2015-09-18 08:27:44,236 - selftest - ERROR - Failed to import oeqa.selftest.buildoptions</div><div>2015-09-18 08:27:44,236 - selftest - ERROR - 'module' object has no attribute 'buildoptions'</div><div><br></div><div>I'm sending the patch V2</div><blockquote type="cite"><div dir="ltr"><div><br></div><div class="gmail_extra">Ross</div></div>
</blockquote></body></html>