From 5f627f2a12d41a35ccab3e5f5e18c67b42d329cb Mon Sep 17 00:00:00 2001 From: Ethan Nagano Date: Sat, 11 Nov 2023 16:09:18 -0800 Subject: [PATCH] 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 --- pywikibot/scripts/wrapper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pywikibot/scripts/wrapper.py b/pywikibot/scripts/wrapper.py index c53d6af108..5b08cc8a5a 100755 --- a/pywikibot/scripts/wrapper.py +++ b/pywikibot/scripts/wrapper.py @@ -433,6 +433,11 @@ def execute(): """ 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