'Translates pagespeed settings in appengine-web.xml to yaml.'

def TranslatePagespeed(self):

    pagespeed = self.app_engine_web_xml.pagespeed
    if (not pagespeed):
        return []
    statements = ['pagespeed:']
    for (title, urls) in [('domains_to_rewrite', pagespeed.domains_to_rewrite), ('url_blacklist', pagespeed.url_blacklist), ('enabled_rewriters', pagespeed.enabled_rewriters), ('disabled_rewriters', pagespeed.disabled_rewriters)]:
        if urls:
            statements.append(('        %s:' % title))
            statements += [('        -    %s' % url) for url in urls]
    return statements
