diff options
Diffstat (limited to 'mesonbuild/modules/qt.py')
-rw-r--r-- | mesonbuild/modules/qt.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index 3157c28..73160c0 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.py @@ -198,12 +198,11 @@ class QtBaseModule(ExtensionModule): abspath: str if isinstance(rcc_file, str): abspath = os.path.join(state.environment.source_dir, state.subdir, rcc_file) - rcc_dirname = os.path.dirname(abspath) else: abspath = rcc_file.absolute_path(state.environment.source_dir, state.environment.build_dir) - rcc_dirname = os.path.dirname(abspath) + rcc_dirname = os.path.dirname(abspath) - # FIXME: what error are we actually trying to check here? + # FIXME: what error are we actually trying to check here? (probably parse errors?) try: tree = ET.parse(abspath) root = tree.getroot() @@ -212,10 +211,14 @@ class QtBaseModule(ExtensionModule): if child.tag != 'file': mlog.warning("malformed rcc file: ", os.path.join(state.subdir, str(rcc_file))) break + elif child.text is None: + raise MesonException(f'<file> element without a path in {os.path.join(state.subdir, str(rcc_file))}') else: result.append(child.text) return rcc_dirname, result + except MesonException: + raise except Exception: raise MesonException(f'Unable to parse resource file {abspath}') |