diff options
| -rw-r--r-- | Lib/defconQt/__main__.py | 7 | ||||
| -rw-r--r-- | Lib/defconQt/util/glyphList.py | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Lib/defconQt/__main__.py b/Lib/defconQt/__main__.py index 79fa2cf..b64405d 100644 --- a/Lib/defconQt/__main__.py +++ b/Lib/defconQt/__main__.py @@ -26,7 +26,12 @@ def main(): glyphListPath = settings.value("settings/glyphListPath", type=str) if glyphListPath and os.path.exists(glyphListPath): from defconQt.util import glyphList - app.GL2UV = glyphList.parseGlyphList(glyphListPath) + try: + glyphList = glyphList.parseGlyphList(glyphListPath) + except Exception as e: + print(e) + else: + app.GL2UV = glyphList window = MainWindow(font) window.show() sys.exit(app.exec_()) diff --git a/Lib/defconQt/util/glyphList.py b/Lib/defconQt/util/glyphList.py index 7c16268..ee97d78 100644 --- a/Lib/defconQt/util/glyphList.py +++ b/Lib/defconQt/util/glyphList.py @@ -11,8 +11,8 @@ def parseGlyphList(path): continue m = _parseGL_RE.match(line) if not m: - print("warning: syntax error in glyphlist: %s".format( - repr(line[:20]))) + raise SyntaxError("syntax error in glyphlist: %s" + .format(repr(line[:20]))) glyphName = m.group(1) if glyphName in GL2UV: print("warning: glyphName redefined in glyphList: {}".format( |
