[Toaster] [review-request] ed/toaster/misc

Damian, Alexandru alexandru.damian at intel.com
Tue Jul 14 06:37:27 PDT 2015


Yep, the original code was about "cwd". Also, I think now that the logging
messages really help, what if we turn them on with the lowest priority
possible ?

Cheers,
Alex

On Tue, Jul 14, 2015 at 2:06 PM, Ed Bartosh <ed.bartosh at linux.intel.com>
wrote:

> Hi Michael,
>
> Thanks for the review.
>
> ...
>
> > While you're in localhostbecontroller
> >
> > We could also get rid of
> >
> >     def _shellcmd(self, command, cwd = None):
> >         if cwd is None:
> >             cwd = self.be.sourcedir
> >
> >         #logger.debug("lbc_shellcmmd: (%s) %s" % (cwd, command))
> >         p = subprocess.Popen(command, cwd = cwd, shell=True,
> > stdout=subprocess.PIPE, stderr=subprocess.PIPE)
> >         (out,err) = p.communicate()
> >         p.wait()
> >         if p.returncode:
> >             if len(err) == 0:
> >                 err = "command: %s \n%s" % (command, out)
> >             else:
> >                 err = "command: %s \n%s" % (command, err)
> >             #logger.warn("localhostbecontroller: shellcmd error %s" %
> err)
> >             raise ShellCmdException(err)
> >         else:
> >             #logger.debug("localhostbecontroller: shellcmd success")
> >             return out
> >
> >
> > I believe with:
> >
> > subprocess.check_output
> >
> Yep, I've noticed this too. I think the reason for not using
> check_output was that it doesn't have cwd parameter.
>
> I'm planning to generalize build controllers, so I'll make much more
> changes to this code anyway. Hopefully it will be for good :)
> Just discussed this with Alex and he seems to be ok with this.
>
> --
> Regards,
> Ed
> --
> _______________________________________________
> toaster mailing list
> toaster at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>



-- 
Alex Damian
Yocto Project
SSG / OTC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20150714/c7bf0412/attachment.html>


More information about the toaster mailing list