[ditz-talk] [PATCH] catch keyboard interrupt so it doesn't print a traceback

Jeff Balogh its.jeff.balogh at gmail.com
Fri Apr 11 02:27:15 EDT 2008


---
I prefer not to see 15 lines of traceback when I ctrl-c ditz, though I'd be fine
with something short like 'caught signal'.  This patch lets ditz make a quiet
exit.

 bin/ditz |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/ditz b/bin/ditz
index ee52b15..729dc46 100755
--- a/bin/ditz
+++ b/bin/ditz
@@ -82,6 +82,8 @@ begin
   op.do cmd, project, config, args
 rescue Ditz::Operator::Error => e
   die e.message
+rescue Interrupt
+  exit 1
 end
 
 ## save project.yaml
-- 
1.5.5



More information about the ditz-talk mailing list