def fetch_pack_index(index_url=None, logger=None, allow_empty=False):
 logger = (logger or LOG)
 index_urls = _build_index_list(index_url)
 (index, status) = _fetch_and_compile_index(index_urls, logger)
 if ((not index) and (not allow_empty)):
  raise ValueError(('No results from the %s: tried %s.\nStatus: %s' % (('index' if (len(index_urls) == 1) else 'indexes'), ', '.join(index_urls), json.dumps(status, indent=4))))
 return (index, status)

def fetch_pack_index ( index_url = None , logger = None , allow_empty = False ) : logger = ( logger or LOG ) index_urls = _build_index_list ( index_url ) ( index , status ) = _fetch_and_compile_index ( index_urls , logger ) if ( ( not index ) and ( not allow_empty ) ) : raise ValueError ( ( 'No results from the %s: tried %s.\nStatus: %s' % ( ( 'index' if ( len ( index_urls ) == 1 ) else 'indexes' ) , ', ' . join ( index_urls ) , json . dumps ( status , indent = 4 ) ) ) ) return ( index , status )
fetch the pack indexes and return the object .