From aa68f0460e4fe7f39ff12c75c0cf4014145811e7 Mon Sep 17 00:00:00 2001 From: Joel Kemp Date: Thu, 9 Jun 2016 17:00:04 -0400 Subject: [PATCH] Show command setup errors Ref https://github.com/mrjoelkemp/Dependents/pull/209 Ref https://github.com/mrjoelkemp/Dependents/pull/208 --- BaseCommand.py | 2 +- lib/command_setup.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseCommand.py b/BaseCommand.py index 8798fd90..7c07c675 100644 --- a/BaseCommand.py +++ b/BaseCommand.py @@ -14,7 +14,7 @@ from .lib.command_setup import command_setup from .lib.track import t from .lib.printer import p - + class BaseCommand(): def run(self, modifier='', edit=None): setup_was_successful = command_setup(self) diff --git a/lib/command_setup.py b/lib/command_setup.py index 06916fec..e537a942 100644 --- a/lib/command_setup.py +++ b/lib/command_setup.py @@ -3,11 +3,13 @@ if sys.version_info < (3,): from track import t + from show_error import show_error from printer import p from node_dependents_editor_backend import backend else: from .track import t from .printer import p + from .show_error import show_error from ..node_dependents_editor_backend import backend def command_setup(self): @@ -32,10 +34,13 @@ def command_setup(self): self.window.config = json.loads(config) p('parsed config from backend', self.window.config) + return success except Exception as e: p(e) + show_error(e, True) + t("Setup Exception", { "message": e })