def check_run_quick(command, echo=True):
 result = run_quick(command, echo)
 if result.returncode:
  error = 'FAILED with exit code {code}\n\nCommand was {command}\n\nError was {stdout}'.format(code=result.returncode, command=command, stdout=result.stdout)
  raise RuntimeError(error)
 return result

def check_run_quick ( command , echo = True ) : result = run_quick ( command , echo ) if result . returncode : error = 'FAILED with exit code {code}\n\nCommand was {command}\n\nError was {stdout}' . format ( code = result . returncode , command = command , stdout = result . stdout ) raise RuntimeError ( error ) return result
a more efficient form of check_run_and_monitor that doesnt monitor output .