def process_status(name):
 with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True):
  res = run_as_root(('supervisorctl status %(name)s' % locals()))
  if res.startswith('No such process'):
   return None
  else:
   return res.split()[1]

def process_status ( name ) : with settings ( hide ( 'running' , 'stdout' , 'stderr' , 'warnings' ) , warn_only = True ) : res = run_as_root ( ( 'supervisorctl status %(name)s' % locals ( ) ) ) if res . startswith ( 'No such process' ) : return None else : return res . split ( ) [ 1 ]
get the status of a supervisor process .