def _listChannels(channelList, is_source, include_checksums): # Lists the packages from these channels # Uniquify the channels channels = set(channelList) rez = [] for channel in channels: c_info = rhnChannel.channel_info(channel) if not c_info: # No packages in this channel continue if is_source: packageList = rhnChannel.list_packages_source(c_info['id']) else: if include_checksums: packageList = rhnChannel.list_packages_checksum_sql( c_info['id']) else: packageList = rhnChannel.list_packages_sql(c_info['id']) for p in packageList: if is_source: for pkg in range(len(p)): if p[pkg] is None: p[pkg] = "" print(p) rez.append([p[0], p[1], p[2], p[3], channel]) else: if include_checksums: rez.append([p[0], p[1], p[2], p[3], p[4], p[6], p[7], channel]) else: rez.append([p[0], p[1], p[2], p[3], p[4], channel]) return rez
def _listChannels(channelList, is_source, include_checksums): # Lists the packages from these channels # Uniquify the channels channels = set(channelList) rez = [] for channel in channels: c_info = rhnChannel.channel_info(channel) if not c_info: # No packages in this channel continue if is_source: packageList = rhnChannel.list_packages_source(c_info['id']) else: if include_checksums: packageList = rhnChannel.list_packages_checksum_sql( c_info['id']) else: packageList = rhnChannel.list_packages_sql(c_info['id']) for p in packageList: if is_source: for pkg in range(len(p)): if p[pkg] is None: p[pkg] = "" print p rez.append([p[0], p[1], p[2], p[3], channel]) else: if include_checksums: rez.append( [p[0], p[1], p[2], p[3], p[4], p[6], p[7], channel]) else: rez.append([p[0], p[1], p[2], p[3], p[4], channel]) return rez