Page MenuHomePhabricator

AutomaticTWSummaryBot.put_current should accept summary keyword with None as value
Closed, ResolvedPublic

Description

passing summary=None to put_current should use the Default edit summary instead of using None. This would enable passing a custum summary by

self.availableOptions['summary'] = None
self.put_current(newtext, summary=self.getOption('summary')

sample:

C:\pwb\GIT\core>pwb.py Basic -page:user:xqt/Test -simulate
Retrieving 1 pages from wikipedia:de.


>>> Benutzer:Xqt/Test <<<
@@ -27 +27 @@
- </table>
+ </table>Test

Edit summary: None
Do you want to accept these changes? ([y]es, [N]o, [a]ll, [q]uit):

Event Timeline

Xqt triaged this task as High priority.Mar 18 2017, 1:02 PM

Change 343445 had a related patch set uploaded (by Xqt):
[pywikibot/core] [bugfix] Use default summary when summary value does not contain a string

https://gerrit.wikimedia.org/r/343445

Change 343445 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Use default summary when summary value does not contain a string

https://gerrit.wikimedia.org/r/343445