parameters: (url, md5sum, alt_url=None)
return_statement: return manifest, download_url
docstring: :param url: URL to download rdmanifest from
      :param md5sum: MD5 sum for validating url download, or None
  
      :returns: (contents of rdmanifest, download_url).  download_url is
        either *url* or *alt_url* and indicates which of the locations
        contents was generated from.
      :raises: :exc:`DownloadFailed`
      :raises: :exc:`InvalidRdmanifest`
docstring_summary: :param url: URL to download rdmanifest from
      :param md5sum: MD5 sum for validating url download, or None
docstring_tokens: : param url : URL to download rdmanifest from : param md5sum : MD5 sum for validating url download or None
function: def download_rdmanifest(url, md5sum, alt_url=None):
      """
      :param url: URL to download rdmanifest from
      :param md5sum: MD5 sum for validating url download, or None
  
      :returns: (contents of rdmanifest, download_url).  download_url is
        either *url* or *alt_url* and indicates which of the locations
        contents was generated from.
      :raises: :exc:`DownloadFailed`
      :raises: :exc:`InvalidRdmanifest`
      """
      # fetch the manifest
      download_url = url
      error_prefix = "Failed to load a rdmanifest from %s: "%(url)
      contents, error = fetch_file(download_url, md5sum)
      # - try the backup url
      if not contents and alt_url: 
          error_prefix = "Failed to load a rdmanifest from either %s or %s: "%(url, alt_url)
          download_url = alt_url
          contents, error = fetch_file(download_url, md5sum)
      if not contents:
          raise DownloadFailed(error_prefix + error)
      manifest = load_rdmanifest(contents)
      return manifest, download_url
function_tokens: def download_rdmanifest ( url , md5sum , alt_url = None ) : # fetch the manifest download_url = url error_prefix = "Failed to load a rdmanifest from %s: " % ( url ) contents , error = fetch_file ( download_url , md5sum ) # - try the backup url if not contents and alt_url : error_prefix = "Failed to load a rdmanifest from either %s or %s: " % ( url , alt_url ) download_url = alt_url contents , error = fetch_file ( download_url , md5sum ) if not contents : raise DownloadFailed ( error_prefix + error ) manifest = load_rdmanifest ( contents ) return manifest , download_url