def get_app_info(app_loc):
 if (not os.path.isdir(app_loc)):
  msg = ('Not a directory: %s' % (app_loc,))
  LOG.error(msg)
  raise ValueError(msg)
 save_cwd = os.getcwd()
 os.chdir(app_loc)
 try:
  cmdv = [common.ENV_PYTHON, 'setup.py', '--name', '--version', '--description', '--author']
  LOG.debug(("Running '%s'" % (' '.join(cmdv),)))
  popen = subprocess.Popen(cmdv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  res = popen.wait()
  (stdout, stderr) = popen.communicate()
  if (res != 0):
   LOG.error(('Error getting application info from %s:\n%s' % (app_loc, stderr)))
   raise OSError(stderr)
  LOG.debug(('Command output:\n<<<\n%s\n>>>' % (stdout,)))
  return stdout.split('\n')[:4]
 finally:
  os.chdir(save_cwd)

def get_app_info ( app_loc ) : if ( not os . path . isdir ( app_loc ) ) : msg = ( 'Not a directory: %s' % ( app_loc , ) ) LOG . error ( msg ) raise ValueError ( msg ) save_cwd = os . getcwd ( ) os . chdir ( app_loc ) try : cmdv = [ common . ENV_PYTHON , 'setup.py' , '--name' , '--version' , '--description' , '--author' ] LOG . debug ( ( "Running '%s'" % ( ' ' . join ( cmdv ) , ) ) ) popen = subprocess . Popen ( cmdv , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) res = popen . wait ( ) ( stdout , stderr ) = popen . communicate ( ) if ( res != 0 ) : LOG . error ( ( 'Error getting application info from %s:\n%s' % ( app_loc , stderr ) ) ) raise OSError ( stderr ) LOG . debug ( ( 'Command output:\n<<<\n%s\n>>>' % ( stdout , ) ) ) return stdout . split ( '\n' ) [ : 4 ] finally : os . chdir ( save_cwd )
get_app_info -> runs the apps setup .