From 560e556d362174991cc356714131b0a69815f507 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Fri, 29 Jul 2022 18:59:25 +0300 Subject: [PATCH] Do not ask for login for -h,--help --- osc/commandline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 278910be..563a16ba 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -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