From c1233295c8c9da03d1ef10b666c52a7172cceff8 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Tue, 23 Apr 2013 13:28:43 +0100 Subject: [PATCH] Optimise wiki update --- fdroidserver/update.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 21cd4add..d793a48c 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -130,6 +130,12 @@ def update_wiki(apps, apks, verbose=False): # We can't have underscores in the page name, even if they're in # the package ID, because MediaWiki messes with them... pagename = app['id'].replace('_', ' ') + + # Drop a trailing newline, because mediawiki is going to drop it anyway + # and it we don't we'll think the page has changed when it hasn't... + if wikidata.endswith('\n'): + wikidata = wikidata[:-1] + generated_pages[pagename] = wikidata # Make a redirect from the name to the ID too, unless there's -- 2.30.2