def run(s,proceed=False,dryrun=False,log=None,quiet=False): report('Running: '+s) if not dryrun: # retval=os.system(s) if log is None: retval=call(s,shell=True) else: retval=run_log(s,log,quiet) if not(proceed) and retval!=0: os.system('CleanSHM.py') die('FAILED to run '+s+': return value is '+str(retval)) return retval else: warn('Dry run, skipping this step')
def run(s,proceed=False,dryrun=False,log=None,quiet=False): report('Running: '+s) if not dryrun: # retval=os.system(s) if log is None: retval=call(s,shell=True) else: retval=run_log(s,log,quiet) if not(proceed) and retval!=0: os.system('CleanSHM.py') die('FAILED to run '+s+': return value is '+str(retval)) return retval else: warn('Dry run, skipping this step')