jenkins-bot has submitted this change and it was merged.
Change subject: remove obsolete dry parameter ......................................................................
remove obsolete dry parameter
-simulate option is enough for printing without any real change
Change-Id: I1a7b21350ea34969155df89f7c460a49e14677bd --- M scripts/pagefromfile.py 1 file changed, 6 insertions(+), 13 deletions(-)
Approvals: Purodha: Looks good to me, but someone else must approve Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py index 5ba1009..fa0e364 100644 --- a/scripts/pagefromfile.py +++ b/scripts/pagefromfile.py @@ -147,14 +147,13 @@ }
def __init__(self, reader, force, append, summary, minor, autosummary, - dry, nocontent): + nocontent): self.reader = reader self.force = force self.append = append self.summary = summary self.minor = minor self.autosummary = autosummary - self.dry = dry self.nocontent = nocontent
def run(self): @@ -212,14 +211,6 @@ if self.autosummary: comment = '' pywikibot.setAction('') - - if self.dry: - pywikibot.output("*** Dry mode ***\n" + \ - "\03{lightpurple}title\03{default}: " + title + "\n" + \ - "\03{lightpurple}contents\03{default}:\n" + contents + "\n" \ - "\03{lightpurple}comment\03{default}: " + comment + "\n") - return - try: page.put(contents, comment=comment, minorEdit=self.minor) except pywikibot.LockedPage: @@ -278,8 +269,10 @@ yield title, contents
def findpage(self, text): - pageR = re.compile(re.escape(self.pageStartMarker) + "(.*?)" + re.escape(self.pageEndMarker), re.DOTALL) - titleR = re.compile(re.escape(self.titleStartMarker) + "(.*?)" + re.escape(self.titleEndMarker)) + pageR = re.compile(re.escape(self.pageStartMarker) + "(.*?)" + + re.escape(self.pageEndMarker), re.DOTALL) + titleR = re.compile(re.escape(self.titleStartMarker) + "(.*?)" + + re.escape(self.titleEndMarker))
location = pageR.search(text) if self.include: @@ -356,7 +349,7 @@ titleStartMarker, titleEndMarker, include, notitle) bot = PageFromFileRobot(reader, force, append, summary, minor, autosummary, - config.simulate, nocontent) + nocontent) bot.run()
if __name__ == "__main__":
pywikibot-commits@lists.wikimedia.org