[bitbake-devel] [PATCH] depexp.py: Fix segfault if DISPLAY is not set

Christopher Larson clarson at kergoth.com
Mon Feb 9 12:20:34 UTC 2015


On Mon, Feb 9, 2015 at 4:37 AM, Maxin B. John <maxin.john at enea.com> wrote:

> +    try:
> +        gtk.init_check()
> +    except:
> +        print "Please set DISPLAY variable before running this command."
> +        sys.exit(1)
> +
>

It's good that you're fixing this, but 1) this uses the old style
non-function print, which isn't supported in new python, and 2) it outputs
the error message to stdout rather than stderr, and 3) it looks like just
returning rather than exiting is likely the best move.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150209/2aab9b0c/attachment-0002.html>


More information about the bitbake-devel mailing list