jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/600941 )
Change subject: [IMPR] Show global options with pwb.py ......................................................................
[IMPR] Show global options with pwb.py
Enable global options handling even if no filename is given for pwb.py. This makes it possible that pwb.py -help prints global options which are handled py pwb.py wrapper script and provides global options even if a script does not call pywikibot.handle_args()
Change-Id: I9524c1f1a95a0db21e94a5875831ef4f4f039b3d --- M pwb.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py index b3e6f5b..e3711e0 100755 --- a/pwb.py +++ b/pwb.py @@ -321,8 +321,6 @@ def main(): """Command line entry point.""" global filename - if not filename: - return False
if global_args: # don't use sys.argv unknown_args = pwb.handle_args(global_args) @@ -332,6 +330,9 @@ ', '.join(unknown_args))) return False
+ if not filename: + return False + file_package = None argvu = pwb.argvu[1:]
pywikibot-commits@lists.wikimedia.org