Michael Pasternak has uploaded a new change for review. Change subject: cli: fix broken pipe ......................................................................
cli: fix broken pipe Change-Id: I64e56d1386bd9f10435df8ec69cdf877d7bcbec8 Signed-off-by: Michael Pasternak <[email protected]> --- M src/cli/context.py M src/ovirtcli/options.py M src/ovirtcli/settings.py 3 files changed, 7 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/01/12901/1 diff --git a/src/cli/context.py b/src/cli/context.py index 2d61ab2..62e4bc3 100644 --- a/src/cli/context.py +++ b/src/cli/context.py @@ -134,8 +134,6 @@ self.__collect_connection_data() self.settings.add_callback('cli:debug', self._set_debug) self._set_debug('cli:debug', self.settings['cli:debug']) - if self.settings['ovirt-shell:no_paging']: - self.mode = ExecutionMode.NOPAGING def _set_debug(self, key, value): """Enable or disable debugging (callback).""" @@ -304,10 +302,10 @@ def _setup_pipeline(self, pipeline): """INTERNAL: set up the pipeline, if any.""" - if not pipeline or self.mode == ExecutionMode.SCRIPT or \ - self.mode == ExecutionMode.NOPAGING: + if not pipeline: self._pipeline = None - return + return + self._pipeline = Popen(pipeline, stdin=PIPE, stderr=PIPE, shell=True) self._pipeinput = codecs.getwriter("utf8")(cStringIO.StringIO()) self.terminal.stdout = self._pipeinput diff --git a/src/ovirtcli/options.py b/src/ovirtcli/options.py index 7be4047..e7b67c6 100644 --- a/src/ovirtcli/options.py +++ b/src/ovirtcli/options.py @@ -55,7 +55,7 @@ self.disable_interspersed_args() # list of hidden app. options (long format) - self.app_options = ['--password', '-p', '--no-paging', '--no_paging'] + self.app_options = ['--password', '-p'] def exit(self, status=0, msg=None): self.values._exit = True diff --git a/src/ovirtcli/settings.py b/src/ovirtcli/settings.py index dcd66f7..241c1cd 100644 --- a/src/ovirtcli/settings.py +++ b/src/ovirtcli/settings.py @@ -70,12 +70,12 @@ ('ovirt-shell:commands', str, '%s shell commands:' % PRODUCT), ('ovirt-shell:misc_commands', str, '%s shell commands:' % PRODUCT), ('ovirt-shell:version', str, ''), - ('ovirt-shell:prompt', str, ''), - ('ovirt-shell:no_paging', boolean, False), + ('ovirt-shell:prompt', str, '') ] # config file white list config_items = [ + 'cli:autopage', 'ovirt-shell:url', 'ovirt-shell:username', 'ovirt-shell:password', @@ -85,6 +85,5 @@ 'ovirt-shell:insecure', 'ovirt-shell:dont_validate_cert_chain', 'ovirt-shell:filter', - 'ovirt-shell:timeout', - 'ovirt-shell:no_paging' + 'ovirt-shell:timeout' ] -- To view, visit http://gerrit.ovirt.org/12901 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64e56d1386bd9f10435df8ec69cdf877d7bcbec8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-cli Gerrit-Branch: master Gerrit-Owner: Michael Pasternak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
