diff options
author | Dan McGee <dan@archlinux.org> | 2015-04-12 10:06:02 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2015-04-12 10:06:02 -0500 |
commit | 790def2f4db2afec150bab8dc842f6068fb751db (patch) | |
tree | 6de8150f26bf180c922432287c9b1626b9069bea | |
parent | a2b020ed3554b47c0b27982cf47431126c103ef4 (diff) |
Force minimum last modified date for package files pages in sitemaprelease_2015-04-13
We fixed the embarrassing '/usr/bin/None' bug here; force Google and
others to reindex these pages if possible by marking them as modified.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | sitemaps.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sitemaps.py b/sitemaps.py index 03ad9254..7746ecab 100644 --- a/sitemaps.py +++ b/sitemaps.py @@ -37,12 +37,17 @@ class PackagesSitemap(Sitemap): class PackageFilesSitemap(PackagesSitemap): changefreq = "weekly" priority = "0.1" + # we fixed a bug on the package files page on this day, force modification + lastmod_min = datetime(2015, 4, 12).replace(tzinfo=utc) def location(self, obj): return PackagesSitemap.location(self, obj) + 'files/' def lastmod(self, obj): - return obj.files_last_update + update = obj.files_last_update + if update is None: + return None + return max(update, self.lastmod_min) class PackageGroupsSitemap(Sitemap): |