Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#12 Two bugs with sitemap_index

open
nobody
None
5
2009-02-02
2009-02-02
Anonymous
No

There is an extra _ in a variable used to generate the sitemap_index (if needed?). As per this description:

---
on line 1802 in the file recently downloaded:
sitemap__index_header = GENERAL_SITEMAP_HEADER

but there is no reference to sitemap__index_header in the whole file.
only to sitemap_index_header.

so i removed one _ and now it's working!
---

The created sitemap_index also contained malformed xml. The first tag was <urlset> but the closing tag was </sitemapindex>.

Not sure if this had anything to do with my specifying .gz for the sitemap files or not.

Discussion

  • --- ../sitemap.orig/sitemap_gen.py 2007-07-18 23:33:30.000000000 -0400
    +++ sitemap_gen.py 2009-02-02 14:03:58.000000000 -0500
    @@ -1799,7 +1799,7 @@
    if self._sitemap_type == 'news':
    sitemap_index_header = NEWS_SITEMAP_HEADER
    else:
    - sitemap__index_header = GENERAL_SITEMAP_HEADER
    + sitemap_index_header = GENERAL_SITEINDEX_HEADER

    # Make a lastmod time
    lastmod = TimestampISO8601(time.time())

     
  • That change should fix both issues.