jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[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(-)

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:]


To view, visit change 600941. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9524c1f1a95a0db21e94a5875831ef4f4f039b3d
Gerrit-Change-Number: 600941
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: jenkins-bot (75)