def _simple_cmd(cmd, app, url='http://localhost:8080/manager', timeout=180):
 try:
  opts = {'path': app, 'version': ls(url)[app]['version']}
  return '\n'.join(_wget(cmd, opts, url, timeout=timeout)['msg'])
 except Exception:
  return 'FAIL - No context exists for path {0}'.format(app)

def _simple_cmd ( cmd , app , url = 'http://localhost:8080/manager' , timeout = 180 ) : try : opts = { 'path' : app , 'version' : ls ( url ) [ app ] [ 'version' ] } return '\n' . join ( _wget ( cmd , opts , url , timeout = timeout ) [ 'msg' ] ) except Exception : return 'FAIL - No context exists for path {0}' . format ( app )
simple command wrapper to commands that need only a path option .