1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 22:56:15 +01:00

Merge pull request #1047 from Ionic/bugfix/no-cmdline-args

commandline: handle calls without arguments gracefully
This commit is contained in:
Daniel Mach 2022-05-31 09:17:42 +02:00 committed by GitHub
commit 981440aa4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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