scripts: Handle ImportError without QUTE_QT_WRAPPER set in link_pyqt

If link_pyqt() is run from mkvenv.py, QUTE_QT_WRAPPER may not be set,
so we shouldn't crash when trying to display import error messages.
This commit is contained in:
Florian Bruhin 2025-09-05 11:24:51 +02:00
parent 7f532f69d2
commit 78b55f84cc
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ def get_lib_path(executable, name, required=True):
return data
elif prefix == 'ImportError':
if required:
wrapper = os.environ["QUTE_QT_WRAPPER"]
wrapper = os.environ.get("QUTE_QT_WRAPPER", "unset")
raise Error(
f"Could not import {name} with {executable}: {data} "
f"(QUTE_QT_WRAPPER: {wrapper})"