Michael Pasternak has uploaded a new change for review.

Change subject: cli: do not ask for credentials when -h--/help in args
......................................................................

cli: do not ask for credentials when -h--/help in args

Change-Id: I26eb25ef079bd7335c71bcc935276176ff781b66
Signed-off-by: Michael pasternak <[email protected]>
---
M src/cli/context.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/20/20920/1

diff --git a/src/cli/context.py b/src/cli/context.py
index 3085b9b..956baaa 100644
--- a/src/cli/context.py
+++ b/src/cli/context.py
@@ -125,6 +125,9 @@
             ('-c' in self.args or '--connect' in self.args)) or \
         self.settings.get('cli:autoconnect')
 
+    def __is_help(self):
+        return '-h' in self.args or '--help' in self.args
+
     def _load_settings(self):
         """Load settings."""
         found, old_format = self.settings.load_config_file()
@@ -133,7 +136,7 @@
         elif old_format:
             self.settings.write_config_file()
         self.__exclude_app_options()
-        if self.__is_auto_connect():
+        if not self.__is_help() and self.__is_auto_connect():
             self.__collect_connection_data()
         self.settings.add_callback('cli:debug', self._set_debug)
         self._set_debug('cli:debug', self.settings['cli:debug'])


-- 
To view, visit http://gerrit.ovirt.org/20920
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26eb25ef079bd7335c71bcc935276176ff781b66
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: cli_3.3
Gerrit-Owner: Michael Pasternak <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to