[OE-core] [PATCH] populate SDK: prepare calling of bb.utils for exceptions
Benjamin Esquivel
benjamin.esquivel at linux.intel.com
Fri Oct 16 20:28:06 UTC 2015
On Thu, 2015-10-15 at 19:15 -0700, Christopher Larson wrote:
>
> 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?
correct, will change to fatal. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20151016/121d62ba/attachment-0002.html>
More information about the Openembedded-core
mailing list