aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helpers/mapping.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/helpers/mapping.py b/helpers/mapping.py
index 858fe77..19fc3c5 100644
--- a/helpers/mapping.py
+++ b/helpers/mapping.py
@@ -9,7 +9,7 @@ import sys
9 9
10from .music_file import * 10from .music_file import *
11from .mixer import Mixer 11from .mixer import Mixer
12from . import Config, gain 12from . import Config, gain, error_print
13 13
14class Mapping(RelativeLayout): 14class Mapping(RelativeLayout):
15 expected_keys = NumericProperty(0) 15 expected_keys = NumericProperty(0)
@@ -89,7 +89,11 @@ class Mapping(RelativeLayout):
89 89
90 def parse_config(self): 90 def parse_config(self):
91 stream = open(Config.yml_file, "r") 91 stream = open(Config.yml_file, "r")
92 config = yaml.load(stream) 92 try:
93 config = yaml.load(stream)
94 except yaml.scanner.ScannerError as e:
95 error_print("Error while loading config file: {}".format(e))
96 sys.exit()
93 stream.close() 97 stream.close()
94 98
95 aliases = config['aliases'] 99 aliases = config['aliases']