From 986d5227d5159efbeb67f860ccd072bd87ebeed7 Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Fri, 18 Feb 2011 16:09:36 +0100
Subject: [PATCH] ctrl+d and ctrl+c in ask don't ask like typing enter

---
 cccli/printer.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cccli/printer.py b/cccli/printer.py
index 5364d3e..b3fad63 100644
--- a/cccli/printer.py
+++ b/cccli/printer.py
@@ -146,8 +146,13 @@ class Printer(object):
             raise cliError("Unable to ask question in non-interactive mode")
         h = list(self.history)
         self.history.clear()
+        r = ""
         try:
             r = self.getline(prompt)
+        except EOFError:
+            pass
+        except KeyboardInterrupt:
+            pass
         finally:
             self.history.load(h)
         return r
-- 
GitLab