def build_list_page(category=None, developer=None, filter=None):
    '''Build page listing available optional items'''
    items = MunkiItems.getOptionalInstallItems()

    header = NSLocalizedString(u"All items", u"AllItemsHeaderText")
    page_name = u'category-all.html'
    if category == 'all':
        category = None
    if category:
        header = category
        page_name = u'category-%s.html' % category
    if developer:
        header = developer
        page_name = u'developer-%s.html' % developer
    if filter:
        header = u'Search results for %s' % filter
        page_name = u'filter-%s.html' % filter

    category_list = []
    for item in items:
        if 'category' in item and item['category'] not in category_list:
            category_list.append(item['category'])

    item_html = build_list_page_items_html(
                            category=category, developer=developer, filter=filter)

    # make HTML for Categories pop-up menu
    all_categories_label = NSLocalizedString(u"All Categories", u"AllCategoriesLabel")
    if category:
        categories_html = u'<option>%s</option>\n' % all_categories_label
    else:
        categories_html = u'<option selected>%s</option>\n' % all_categories_label

    for item in sorted(category_list):
        if item == category:
            categories_html += u'<option selected>%s</option>\n' % item
        else:
            categories_html += item % u'<option>%s</option>\n'

    categories_html_list = ''
    # make HTML for list of categories
    for item in sorted(category_list):
        categories_html_list += (u'<li class="link"><a href="category-%s.html">%s</a></li>\n'
                                 % (quote(item), item))

    page = {}
    page['list_items'] = item_html
    page['category_items'] = categories_html
    page['category_list'] = categories_html_list
    page['header_text'] = header
    if category or filter or developer:
        showcase = ''
    else:
        showcase = get_template('showcase_template.html', raw=True)
    sidebar = get_template('sidebar_template.html', raw=True)
    footer = get_template('footer_template.html', raw=True)
    generate_page(page_name, 'list_template.html', page,
                  showcase=showcase, sidebar=sidebar, footer=footer)
dataset/ETHPy150Open munki/munki/code/apps/Managed Software Center/Managed Software Center/mschtml.py/build_list_page/swapped operands of `%`