Roundup Tracker - Issues

Message1896

Author micktwomey
Recipients
Date 2005-03-15.11:00:35
Message-id
In-reply-to
I've been using XML templates (e.g. home.atom.xml and
xmlwidgets.xml) with roundup 0.8 and I'm encountering
issues with it not being able to find them. I think the
problem is in the code in
roundup.cgi.templating.find_template which tries to
look for html and xml files:

    # try with a .html or .xml extension (new-style)
    for extension in '.html', '.xml':
        filename = filename + extension
        src = os.path.join(dir, filename)
        if os.path.exists(src):
            return (src, filename)

On the first pass it will look for foo.html but on the
second pass it will look for foo.html.xml since
filename has been clobbered. Changing the code to this
fixes it:

    # try with a .html or .xml extension (new-style)
    for extension in '.html', '.xml':
        f = filename + extension
        src = os.path.join(dir, f)
        if os.path.exists(src):
            return (src, f)

I've attached a diff against CVS HEAD too. Applying
this patch to my copy of roundup lets it find my xml
templates. Without this change my roundup instance
won't even start as it has a fit over xmlwidgets.xml.
History
Date User Action Args
2009-02-03 14:21:15adminlinkissue1163629 messages
2009-02-03 14:21:15admincreate