From 9c4f705fc6e8ef19973c1977ae8a5b9982cf6ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 25 Jul 2016 11:51:54 +0200 Subject: Add error message if the config file doesn't load --- helpers/mapping.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helpers/mapping.py b/helpers/mapping.py index 0c81af4..d60e709 100644 --- a/helpers/mapping.py +++ b/helpers/mapping.py @@ -23,7 +23,13 @@ class Mapping(RelativeLayout): self.mixer = Mixer() else: self.mixer = None - self.key_config, self.open_files = self.parse_config() + + try: + self.key_config, self.open_files = self.parse_config() + except Exception as e: + error_print("Error while loading configuration: {}".format(e)) + sys.exit() + super(Mapping, self).__init__(**kwargs) self._keyboard = Window.request_keyboard(self._keyboard_closed, self) self._keyboard.bind(on_key_down=self._on_keyboard_down) -- cgit v1.2.3