[OE-core] [PATCH] populate SDK: prepare calling of bb.utils for exceptions

Christopher Larson clarson at kergoth.com
Fri Oct 16 02:15:35 UTC 2015


On Thu, Oct 15, 2015 at 10:27 AM, Benjamin Esquivel <
benjamin.esquivel at linux.intel.com> wrote:

> +    def movefile(self, sourcefile, destdir):
> +        try:
> +            # FIXME: this check of movefile's return code to None should
> be
> +            # fixed within the function to use only exceptions to signal
> when
> +            # something goes wrong
> +            if (bb.utils.movefile(sourcefile, destdir) == None):
> +                raise Exception("moving {} to {} failed".format(
> +                                        sourcefile, destdir))
> +        except Exception as e:
> +            bb.warn(str(e))
> +            bb.error("unable to place {} in final SDK location".format(
> +                        sourcefile))
> +
> +    def mkdirhier(self, dirpath):
> +        try:
> +            bb.utils.mkdirhier(dirpath)
> +        except OSError as e:
> +            bb.warn(str(e))
> +            bb.error("cannot make dir for SDK: {}".format(dirpath))
>

Shouldn't this be fatal?
-- 
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/openembedded-core/attachments/20151015/5372c662/attachment-0002.html>


More information about the Openembedded-core mailing list