python/dna/utils.py
def is_running(process):
    ''' `pgrep` returns an error code if no process was found '''
    try:
        pgrep = sh.Command('/usr/bin/pgrep')
        pgrep(process)
        flag = True
    except sh.ErrorReturnCode_1:
        flag = False
    return flag
def is_running(process):
    ''' `pgrep` returns an error code if no process was found '''
    try:
        pgrep = sh.Command('/usr/bin/pgrep')
        pgrep(process)
        flag = True
    except sh.ErrorReturnCode_1:
        flag = False
    return flag
def is_running ( process ) : try : pgrep = sh . Command ( '/usr/bin/pgrep' ) pgrep ( process ) flag = True except sh . ErrorReturnCode_1 : flag = False return flag
`pgrep` returns an error code if no process was found
pgrep returns an error code if no process was found