From cf2a4f174bb49a6c9e839217369b1e22741a10da Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 15 Jan 2013 14:30:39 +0100 Subject: grc: Fixed Bug #485 by gracefully exiting when user sets GR_DONT_LOAD_PREFS=1 GRC_BLOCKS_PATH= --- grc/gui/MainWindow.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'grc/gui/MainWindow.py') diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py index 37a100c94..1dc02dabb 100644 --- a/grc/gui/MainWindow.py +++ b/grc/gui/MainWindow.py @@ -180,6 +180,9 @@ class MainWindow(gtk.Window): if file_path: Messages.send_end_load() except Exception, e: #return on failure Messages.send_fail_load(e) + if isinstance(e, KeyError) and str(e) == "'options'": + # This error is unrecoverable, so crash gracefully + exit(-1) return #add this page to the notebook self.notebook.append_page(page, page.get_tab()) -- cgit