Ejemplo n.º 1
0
 def exec_shell(self, cmd_str):
     res, out, err = grc.get_exitcode_stdout_stderr(cmd_str)
     if len(out) > 0:
         self.log(out.decode('utf-8'))
     if len(err) > 0:
         self.log(err.decode('utf-8'))
     if res != 0:
         self.log("command terminated with error code %d" % res)
Ejemplo n.º 2
0
 def exec_shell(self, cmd_str):
     res, out, err = grc.get_exitcode_stdout_stderr(cmd_str)
     if len(out) > 0:
         self.log(out.decode('utf-8'))
     if len(err) > 0:
         self.log(err.decode('utf-8'))
     if res != 0:
         self.log("command terminated with error code %d" % res)