From 98cf56caaacda1b1f3ef8b571fe601fe0acdd8bf Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 17 Oct 2017 19:15:28 +0200 Subject: [PATCH 23/69] tools/kvm_stat: catch curses exceptions only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: David Hildenbrand Message-id: <20171017191605.2378-3-david@redhat.com> Patchwork-id: 77311 O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 02/39] tools/kvm_stat: catch curses exceptions only Bugzilla: 1497137 RH-Acked-by: Paolo Bonzini RH-Acked-by: Cornelia Huck RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Thomas Huth Upstream-status: linux.git 9fc0adfc427a5e3f95f8db8dafabe1eaa3720f4a commit 9fc0adfc427a5e3f95f8db8dafabe1eaa3720f4a Author: Stefan Raspl Date: Fri Mar 10 13:40:01 2017 +0100 tools/kvm_stat: catch curses exceptions only The previous version was catching all exceptions, including SIGINT. We only want to catch the curses exceptions here. Signed-off-by: Stefan Raspl Reviewed-by: Janosch Frank Reviewed-by: Sascha Silbe Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Miroslav Rezanina --- scripts/kvm/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index 8cc83a3..ef47ad7 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/kvm_stat @@ -809,7 +809,7 @@ class Tui(object): # return from C start_color() is ignorable. try: curses.start_color() - except: + except curses.error: pass # Hide cursor in extra statement as some monochrome terminals -- 1.8.3.1