jenkins-bot has submitted this change and it was merged.

Change subject: Bug 68657-claimit without arguments has no output
......................................................................


Bug 68657-claimit without arguments has no output

Added help output.

Change-Id: I8abeae56052dfa78a1cfbac812987d56ec5ad0f1
---
M scripts/claimit.py
M tests/script_tests.py
2 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/scripts/claimit.py b/scripts/claimit.py
index af74030..c8140fa 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -60,6 +60,12 @@
 import pywikibot
 from pywikibot import pagegenerators, WikidataBot
 
+# This is required for the text that is shown when you run this script
+# with the parameter -help or without parameters.
+docuReplacements = {
+    '&params;': pagegenerators.parameterHelp,
+}
+
 
 class ClaimRobot(WikidataBot):
     """
@@ -190,7 +196,8 @@
 
     generator = gen.getCombinedGenerator()
     if not generator:
-        # FIXME: Should throw some help
+        # show help text from the top of this file
+        pywikibot.showHelp()
         return
 
     bot = ClaimRobot(generator, claims, exists_arg)
diff --git a/tests/script_tests.py b/tests/script_tests.py
index ef151ed..e631458 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -107,6 +107,7 @@
     'archivebot': 'NOTE: you must specify a template to run the bot',
     'commonscat': 'add_text.NoEnoughData',
     'create_categories': 'No pages to work on',
+    # TODO: until done here, remember to set editor = None in user_config.py
     'editarticle': 'Nothing changed',  # This masks related bug 68645 but that
                                        # bug is more broadly about config
                                        # rather than editarticle.
@@ -220,7 +221,6 @@
             if script_name in ['add_text',        # raises custom NoEnoughData
                                'checkimages',     # bug 68613
                                'commonscat',      # raises custom NoEnoughData
-                               'claimit',         # bug 68657 - zero output
                                'data_ingestion',  # bug 68611
                                'disambredir',     # quittable auto-run with
                                                   # highly variable output.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8abeae56052dfa78a1cfbac812987d56ec5ad0f1
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Ricordisamoa <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to