[Toaster] [review-request] ed/toaster/misc
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Jul 14 06:52:20 PDT 2015
On Tue, Jul 14, 2015 at 02:37:27PM +0100, Damian, Alexandru wrote:
> 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 ?
Uncommented them. Please review.
> 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
--
--
Regards,
Ed
More information about the toaster
mailing list