Juan Hernandez has uploaded a new change for review. Change subject: cli: Show HTTP error page only in debug mode ......................................................................
cli: Show HTTP error page only in debug mode Currently when we try to connect to the engine and the connection fails with an HTTP error code we print the error document to the output. This is usually an HTML document, and not friendly for the user. This patch changes the CLI so that it will only print the error document when the -d option has been specified. Change-Id: Ic6a3a1ec12f343038a6b0ddac2fe875b46841471 Bug-Url: https://bugzilla.redhat.com/869283 Signed-off-by: Juan Hernandez <[email protected]> --- M src/ovirtcli/command/connect.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/82/24082/1 diff --git a/src/ovirtcli/command/connect.py b/src/ovirtcli/command/connect.py index 61723d8..e4ead52 100644 --- a/src/ovirtcli/command/connect.py +++ b/src/ovirtcli/command/connect.py @@ -146,7 +146,10 @@ except RequestError, e: StateMachine.rollback() self.__cleanContext() - self.error("[" + str(e.status) + '] - ' + str(e.reason) + ', ' + str(e.detail)) + if debug: + self.error("[" + str(e.status) + '] - ' + str(e.reason) + ', ' + str(e.detail)) + else: + self.error("[" + str(e.status) + '] - ' + str(e.reason)) except NoCertificatesError: StateMachine.rollback() self.__cleanContext() -- To view, visit http://gerrit.ovirt.org/24082 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6a3a1ec12f343038a6b0ddac2fe875b46841471 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-cli Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
