Blame SOURCES/kvm-tools-kvm_stat-catch-curses-exceptions-only.patch

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