From b57e9791ccc8d2b796dc40b82c474a5fdcb14ad2 Mon Sep 17 00:00:00 2001
From: Michael DM Dryden <mdryden@chem.utoronto.ca>
Date: Mon, 3 Apr 2017 18:27:22 -0400
Subject: [PATCH] data_view: suppress error when nothing selected.

---
 dstat_interface/interface/data_view.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dstat_interface/interface/data_view.py b/dstat_interface/interface/data_view.py
index 2ef8ff5..e4bd711 100644
--- a/dstat_interface/interface/data_view.py
+++ b/dstat_interface/interface/data_view.py
@@ -47,7 +47,12 @@ class DataPage(object):
         
     def combobox_changed(self, object):
         """Switch displayed data buffer."""
-        self.textview.set_buffer(self.buffers[self.combobox.get_active_id()])
+        try:
+            self.textview.set_buffer(
+                self.buffers[self.combobox.get_active_id()]
+            )
+        except KeyError:
+            pass
         
 class InfoPage(object):
     def __init__(self, notebook, name="Info"):
-- 
GitLab