jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Only complain in add_text.py when parameters are present ......................................................................
[FIX] Only complain in add_text.py when parameters are present
Change-Id: Ib6118e5fb2896b38a93ed62b024d451ea0d9bfc7 --- M scripts/add_text.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/add_text.py b/scripts/add_text.py index 77e73eb..b3cd488 100644 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -343,14 +343,14 @@ if textfile and not addText: with codecs.open(textfile, 'r', config.textfile_encoding) as f: addText = f.read() - if not addText: - pywikibot.error("The text to add wasn't given.") - return if not generator: generator = genFactory.getCombinedGenerator() if not generator: pywikibot.showHelp() return + if not addText: + pywikibot.error("The text to add wasn't given.") + return if talkPage: generator = pagegenerators.PageWithTalkPageGenerator(generator) site = pywikibot.Site()