[PATCH 02/17] tools/kvm_stat: catch curses exceptions only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The previous version was catching all exceptions, including SIGINT.
We only want to catch the curses exceptions here.

Signed-off-by: Stefan Raspl <raspl@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Sascha Silbe <silbe@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
---
 tools/kvm/kvm_stat/kvm_stat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat
index 8cc83a30..ef47ad7 100755
--- a/tools/kvm/kvm_stat/kvm_stat
+++ b/tools/kvm/kvm_stat/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
-- 
2.8.4




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux