Ricordisamoa has uploaded a new change for review.

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

Change subject: add ability for custom module name in pywikibot.showHelp
......................................................................

add ability for custom module name in pywikibot.showHelp

Change-Id: I37b5f521d508be12bc1a787eb89ebdef10824e63
---
M pywikibot/bot.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/37/136637/1

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 2e7e859..b6857c8 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -662,9 +662,9 @@
     return nonGlobalArgs
 
 
-def showHelp(name=""):
-    # argument, if given, is ignored
-    modname = calledModuleName()
+def showHelp(modname=None):
+    if not modname:
+        modname = calledModuleName()
     if not modname:
         try:
             modname = sys.modules['__main__'].main.__module__

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37b5f521d508be12bc1a787eb89ebdef10824e63
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>

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

Reply via email to