Esempio n. 1
0
def run_command(command, verbose=False):
    log = utils.buffer()
    out = log
    error = utils.quotedFile(log, "\033[31m", "\033[0m")
    message = ''
    if verbose:
        message = "Running: '%s'" % command
        out = utils.tee(log, sys.stdout)
        error = utils.tee(error, sys.stderr)

    ok = utils.run(command, log=out, err=error, fatal=False, message=message)
    return log.output(), ok
Esempio n. 2
0
def run_command(command, verbose=False):
	log = utils.buffer()
	out = log
	error = utils.quotedFile(log, "\033[31m", "\033[0m")
	message=''
	if verbose:
		message = "Running: '%s'"%command
		out = utils.tee(log, sys.stdout)
		error = utils.tee(error, sys.stderr)

	ok = utils.run(command, log=out, err=error, fatal=False, message=message)
	return log.output(), ok
Esempio n. 3
0
	def x(self, command) :
		return utils.run(
			command%self.defs,
			message="" if _quiet else None,
			log = utils.null(),
			)
Esempio n. 4
0
	def _run(self, command) :
		utils.run(
			command%self.__dict__,
			message = None if self._verbose else "",
			log = utils.null(),
			)
Esempio n. 5
0
 def x(self, command):
     return utils.run(
         command % self.defs,
         message="" if _quiet else None,
         log=utils.null(),
     )
Esempio n. 6
0
 def _run(self, command):
     utils.run(
         command % self.__dict__,
         message=None if self._verbose else "",
         log=utils.null(),
     )