jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/973395 )

Change subject: Pass global -nolog argument into bot script from wrapper.
......................................................................

Pass global -nolog argument into bot script from wrapper.

Scripts using handle_args function will create command log even -nolog is
given as global option to pwb wrapper script. Therefore pass -nolog option
as script option.

Bug: T328900
Change-Id: Ib8203600a2925680e979867d8603e0c3e05d8188
---
M pywikibot/scripts/wrapper.py
1 file changed, 19 insertions(+), 0 deletions(-)

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




diff --git a/pywikibot/scripts/wrapper.py b/pywikibot/scripts/wrapper.py
index c53d6af..5b08cc8 100755
--- a/pywikibot/scripts/wrapper.py
+++ b/pywikibot/scripts/wrapper.py
@@ -433,6 +433,11 @@
     """
     global filename

+    # If -nolog options are in global args, add them to
+    # script args.
+    if '-nolog' in global_args:
+        script_args.append('-nolog')
+
     if global_args:  # don't use sys.argv
         unknown_args = pwb.handle_args(global_args)
         if unknown_args:  # pragma: no cover

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/973395
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib8203600a2925680e979867d8603e0c3e05d8188
Gerrit-Change-Number: 973395
Gerrit-PatchSet: 5
Gerrit-Owner: Enag2000 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to