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

-- 
To view, visit https://gerrit.wikimedia.org/r/156674
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6118e5fb2896b38a93ed62b024d451ea0d9bfc7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to