sregistry/utils/terminal.py
def check_install(software=None, quiet=True):
    '''check_install will attempt to run the singularity command, and
       return True if installed. The command line utils will not run 
       without this check.

       Parameters
       ==========
       software: the software to check if installed
       quiet: should we be quiet? (default True)
    '''
    if software is None:
        software = "singularity"
    cmd = [software, '--version']
    try:
        version = run_command(cmd,software)
    except: # FileNotFoundError
        return False
    if version is not None:
        if quiet is False and version['return_code'] == 0:
            version = version['message']
            bot.info("Found %s version %s" % (software.upper(), version))
        return True 
    return False
def check_install(software=None, quiet=True):
    '''check_install will attempt to run the singularity command, and
       return True if installed. The command line utils will not run 
       without this check.

       Parameters
       ==========
       software: the software to check if installed
       quiet: should we be quiet? (default True)
    '''
    if software is None:
        software = "singularity"
    cmd = [software, '--version']
    try:
        version = run_command(cmd,software)
    except: # FileNotFoundError
        return False
    if version is not None:
        if quiet is False and version['return_code'] == 0:
            version = version['message']
            bot.info("Found %s version %s" % (software.upper(), version))
        return True 
    return False
def check_install ( software = None , quiet = True ) : if software is None : software = "singularity" cmd = [ software , '--version' ] try : version = run_command ( cmd , software ) except : # FileNotFoundError return False if version is not None : if quiet is False and version [ 'return_code' ] == 0 : version = version [ 'message' ] bot . info ( "Found %s version %s" % ( software . upper ( ) , version ) ) return True return False
check_install will attempt to run the singularity command, and
       return True if installed. The command line utils will not run 
       without this check.

       Parameters
       ==========
       software: the software to check if installed
       quiet: should we be quiet? (default True)
check_install will attempt to run the singularity command and return True if installed . The command line utils will not run without this check .