jenkins-bot submitted this change.
[bugfix] Remove multiple empty lines from archived page
Simplify fix trailing newlines
Bug: T306529
Change-Id: I8c60c6ad16848b15682a4cf240da491f499fedd8
---
M scripts/archivebot.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index ddd9802..2b02bf7 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -497,7 +497,7 @@
if sort_threads:
pywikibot.output('Sorting threads...')
self.threads.sort(key=lambda t: t.timestamp)
- newtext = re.sub('\n*$', '\n\n', self.header) # Fix trailing newlines
+ newtext = self.header.strip() + '\n\n' # Fix trailing newlines
for t in self.threads:
newtext += t.to_text()
if self.full:
To view, visit change 784705. To unsubscribe, or for help writing mail filters, visit settings.