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:
commit
981440aa4e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user