[bitbake-devel] [PATCH] server/process.py: Change timeout error handling

Chris Larson clarson at kergoth.com
Wed Nov 21 17:22:41 UTC 2012


On Wed, Nov 21, 2012 at 10:08 AM, Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:

> > This code is run in UI context, not server context, no? So the UI
> > should be checking the return of runCommand, seeing the error, and
> > aborting itself in whatever clean fashion is appropriate, rather than
> > the rather less so immediate sys.exit. Given that, I don't really see
> > how switching to bb.fatal here is buying us much. If we truly want
> > that error path to be different from that of other command failures,
> > then I would think that raising an appropriate exception (e.g.
> > something other than SystemExit) would be better.
>
> The issue is that after this particular failure, any further runCommand
> is going to go badly wrong. "Timeout" would imply you could retry and in
> this case as described above, you cannot (which I agree sucks).
>
> So I think exiting in this case isn't such a bad thing although I'm less
> than happy about it. The only thing the UI could do is throw an error
> and exit.


Agreed, but I think that's where the responsibility belongs. From the
perspective of the UI, calling an API that exits you, for any reason, is
pretty disgusting.
-- 
Christopher Larson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20121121/c9ea7ec3/attachment-0001.html>


More information about the bitbake-devel mailing list