def get_catalogs(cataloglist):
    'Retrieves the catalogs from the server and populates our catalogs\n    dictionary.\n    '
    for catalogname in cataloglist:
        if (not (catalogname in _CATALOG)):
            catalogpath = download.download_catalog(catalogname)
            if catalogpath:
                try:
                    catalogdata = FoundationPlist.readPlist(catalogpath)
                except FoundationPlist.NSPropertyListSerializationException:
                    display.display_error('Retrieved catalog %s is invalid.', catalogname)
                    try:
                        os.unlink(catalogpath)
                    except (OSError, IOError):
                        pass
                else:
                    _CATALOG[catalogname] = make_catalog_db(catalogdata)
Retrieves the catalogs from the server and populates our catalogs
dictionary.
def get_catalogs(cataloglist):
    'Retrieves the catalogs from the server and populates our catalogs\n    dictionary.\n    '
    for catalogname in cataloglist:
        if (not (catalogname in _CATALOG)):
            catalogpath = download.download_catalog(catalogname)
            if catalogpath:
                try:
                    catalogdata = FoundationPlist.readPlist(catalogpath)
                except FoundationPlist.NSPropertyListSerializationException:
                    display.display_error('Retrieved catalog %s is invalid.', catalogname)
                    try:
                        os.unlink(catalogpath)
                    except (OSError, IOError):
                        pass
                else:
                    _CATALOG[catalogname] = make_catalog_db(catalogdata)