tools/utils.py
def cmd(command, check=True, verbose=False, shell=False, cwd=None):
    """A wrapper to run a command as a blocking job"""
    text = command if shell else ' '.join(command)
    if verbose:
        print text
    return_code = call(command, shell=shell, cwd=cwd)
    if check and return_code != 0:
        raise Exception('ERROR %d: "%s"' % (return_code, text))
A wrapper to run a command as a blocking job
A wrapper to run a command as a blocking job
A wrapper to run a command as a blocking job
def cmd(command, check=True, verbose=False, shell=False, cwd=None):
    text = command if shell else ' '.join(command)
    if verbose:
        print text
    return_code = call(command, shell=shell, cwd=cwd)
    if check and return_code != 0:
        raise Exception('ERROR %d: "%s"' % (return_code, text))
def cmd ( command , check = True , verbose = False , shell = False , cwd = None ) : text = command if shell else ' ' . join ( command ) if verbose : print text return_code = call ( command , shell = shell , cwd = cwd ) if check and return_code != 0 : raise Exception ( 'ERROR %d: "%s"' % ( return_code , text ) )
A wrapper to run a command as a blocking job
A wrapper to run a command as a blocking job
"""A wrapper to run a command as a blocking job"""
command
check
verbose
shell
cwd