Example #1
0
 def run(self, command, args):
     # as we pass popen3 as sequence, it executes monotone with these
     # arguments - and does not pass them through the shell according
     # to help(os.popen3)
     #       print(("standalone is running:", command, args))
     to_run = self.base_command + [command] + args
     process = popen2.Popen3(to_run, capturestderr=True)
     for line in process.fromchild:
         yield line
     stderr_data = process.childerr.read()
     if len(stderr_data) > 0:
         raise MonotoneException("data on stderr for command '%s': %s" %
                                 (command, stderr_data))
     terminate_popen3(process)
Example #2
0
    def run(self, command, args):
        # as we pass popen3 as sequence, it executes monotone with these 
        # arguments - and does not pass them through the shell according 
        # to help(os.popen3)
#       print(("standalone is running:", command, args))
        to_run = self.base_command + [command] + args
        process = popen2.Popen3(to_run, capturestderr=True)
        for line in process.fromchild:
            yield line
        stderr_data = process.childerr.read()
        if len(stderr_data) > 0:
            raise MonotoneException("data on stderr for command '%s': %s" % (command, 
                                                                             stderr_data))
        terminate_popen3(process)
Example #3
0
 def stop(self):
     if not self.process:
         return
     terminate_popen3(self.process)
     self.process = None
Example #4
0
 def stop(self):
     if not self.process:
         return
     terminate_popen3(self.process)
     self.process = None