jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/784705 )

Change subject: [bugfix] Remove multiple empty lines from archived page
......................................................................

[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(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



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 https://gerrit.wikimedia.org/r/c/pywikibot/core/+/784705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8c60c6ad16848b15682a4cf240da491f499fedd8
Gerrit-Change-Number: 784705
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Misza <[email protected]>
Gerrit-Reviewer: Valerio Bozzolan <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to