chiark / gitweb /
A few more wiki fixes
authorCiaran Gultnieks <ciaran@ciarang.com>
Wed, 9 Oct 2013 12:23:17 +0000 (13:23 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Wed, 9 Oct 2013 12:23:17 +0000 (13:23 +0100)
fdroidserver/update.py

index 03865e2c9f355bf51da3d65ed1d7a609bdb48588..9a6b5ba3bf2f3339c7154d56134c5b312d38b758 100644 (file)
@@ -146,7 +146,7 @@ def update_wiki(apps, apks, verbose=False):
             wikidata += '\n[[Category:Apps with no packages]]\n'
         elif cantupdate and not app['Disabled']:
             wikidata += "\n[[Category:Apps we can't update]]\n"
-        elif cantupdate and not app['Disabled']:
+        elif buildfails and not app['Disabled']:
             wikidata += "\n[[Category:Apps with failing builds]]\n"
         elif not gotcurrentver and not app['Disabled']:
             wikidata += '\n[[Category:Apps to Update]]\n'
@@ -171,8 +171,11 @@ def update_wiki(apps, apks, verbose=False):
         apppagename = apppagename.replace('{', '')
         apppagename = apppagename.replace('}', ' ')
         apppagename = apppagename.replace(':', ' ')
-        for page in site.allpages(prefix=apppagename, filterredir='nonredirects'):
-            if page.name == apppagename:
+        # Drop double spaces caused mostly by replacing ':' above
+        apppagename = apppagename.replace('  ', ' ')
+        for expagename in site.allpages(prefix=apppagename,
+                filterredir='nonredirects', generator=False):
+            if expagename == apppagename:
                 noclobber = True
         # Another reason not to make the redirect page is if the app name
         # is the same as it's ID, because that will overwrite the real page