1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-24 11:12:14 +01:00

Do not ask for login for -h,--help

This commit is contained in:
Anatoli Babenia 2022-07-29 18:59:25 +03:00
parent 4a67768cbd
commit 560e556d36

View File

@ -126,7 +126,11 @@ class Osc(cmdln.Cmdln):
def postoptparse(self):
"""merge commandline options into the config"""
if not self.args or self._get_canonical_cmd_name(self.args[0]) == "help":
if (
not self.args
or self._get_canonical_cmd_name(self.args[0]) == "help"
or {'-h', '--help'} & set(self.args)
):
# avoid loading config that may trigger prompt for username, password etc.
return