Michael Pasternak has uploaded a new change for review.

Change subject: cli: do not recover prompt while still in error
......................................................................

cli: do not recover prompt while still in error

Change-Id: Idd3ec528be0c82c4f7b04f234554210329c10d3e
Signed-off-by: Michael pasternak <mpast...@redhat.com>
---
M src/ovirtcli/shell/engineshell.py
1 file changed, 10 insertions(+), 4 deletions(-)


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

diff --git a/src/ovirtcli/shell/engineshell.py 
b/src/ovirtcli/shell/engineshell.py
index 528b30f..e8a80d6 100644
--- a/src/ovirtcli/shell/engineshell.py
+++ b/src/ovirtcli/shell/engineshell.py
@@ -172,11 +172,17 @@
                         StateMachine.unauthorized()  # @UndefinedVariable
                     elif self.__last_status <> -1 and \
                          (
-                          self.__last_status == \
-                          self.context.COMMUNICATION_ERROR
+                            (
+                                self.__last_status == 
self.context.COMMUNICATION_ERROR
+                                and
+                                StateMachine.get_current_state() != 
DFSAState.COMMUNICATION_ERROR
+                            )
                           or \
-                          self.__last_status == \
-                          self.context.AUTHENTICATION_ERROR
+                            (
+                                self.__last_status == 
self.context.AUTHENTICATION_ERROR
+                                and
+                                StateMachine.get_current_state() != 
DFSAState.UNAUTHORIZED
+                            )
                          ):
                         self.__set_prompt(
                           mode=PromptMode.Original


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd3ec528be0c82c4f7b04f234554210329c10d3e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Michael Pasternak <mpast...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to