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

Michael Wood michael.g.wood at intel.com
Mon Jul 13 09:47:53 PDT 2015


On 10/07/15 15:48, Ed Bartosh wrote:
> Hi reviewers,
>
> Please review fix for YOCTO: #7965: Wait for toaster gui to come
> and couple of other changes:
> 1. tiny refactoring change:  get rid of _createdirpath function
> 2. and small fix: Fix usage of wrong variables
>
> --
> Regards,
> Ed

* 7cee08d toaster: get rid of _createdirpath function
* eae47f7 toaster: Fix usage of wrong variables
* 321d6ae toaster: Wait for toaster gui to come

Looks fine to me, though not familiar enough with build stuff to fully 
OK this branch.

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

Thanks,

Michael


More information about the toaster mailing list