Michael Pasternak has uploaded a new change for review.

Change subject: cli: make ctrl-c breaking the command rather than existing 
shell #869269
......................................................................

cli: make ctrl-c breaking the command rather than existing shell #869269

Change-Id: Ia6b9020bb8b8177d018dac08e1734c681603445e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=869269
Signed-off-by: Michael pasternak <mpast...@redhat.com>
---
M src/ovirtcli/shell/engineshell.py
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/src/ovirtcli/shell/engineshell.py 
b/src/ovirtcli/shell/engineshell.py
index c74fbec..d76380e 100644
--- a/src/ovirtcli/shell/engineshell.py
+++ b/src/ovirtcli/shell/engineshell.py
@@ -93,6 +93,8 @@
         try:
             if clear: self.do_clear('')
             return cmd.Cmd.cmdloop(self, intro)
+        except KeyboardInterrupt, e:
+            return self.cmdloop(intro="^C", clear=False)
         except Exception, e:
             self._error(str(e))
             return self.cmdloop(intro, clear=False)
@@ -409,5 +411,4 @@
         else: print self.prompt
     ############################## COMMON ################################
     def handler(self, signum, frame):
-        self.emptyline(no_prompt=True)
-        sys.exit()
+        raise KeyboardInterrupt


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6b9020bb8b8177d018dac08e1734c681603445e
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