mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 13:14:37 +03:00
Impl resilience to missing wasm Updates.xml files
Allows MetadataFactory to produce a list of architectures when the standard Updates.xml file is present, but the expected wasm Updates.xml file is not.
This commit is contained in:
@@ -591,9 +591,23 @@ class MetadataFactory:
|
|||||||
|
|
||||||
def fetch_arches(self, version: Version) -> List[str]:
|
def fetch_arches(self, version: Version) -> List[str]:
|
||||||
arches = []
|
arches = []
|
||||||
|
qt_ver_str = self._get_qt_version_str(version)
|
||||||
for extension in self.archive_id.all_extensions(version):
|
for extension in self.archive_id.all_extensions(version):
|
||||||
qt_ver_str = self._get_qt_version_str(version)
|
modules: Dict[str, Dict[str, str]] = {}
|
||||||
modules = self._fetch_module_metadata(self.archive_id.to_folder(qt_ver_str, extension))
|
try:
|
||||||
|
modules = self._fetch_module_metadata(self.archive_id.to_folder(qt_ver_str, extension))
|
||||||
|
except ArchiveDownloadError as e:
|
||||||
|
if extension == "":
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
self.logger.debug(e)
|
||||||
|
self.logger.debug(
|
||||||
|
f"Failed to retrieve arches list with extension `{extension}`. "
|
||||||
|
f"Please check that this extension exists for this version of Qt: "
|
||||||
|
f"if not, code changes will be necessary."
|
||||||
|
)
|
||||||
|
# It's ok to swallow this error: we will still print the other available architectures that aqt can
|
||||||
|
# install successfully. This is to prevent future errors such as those reported in #643
|
||||||
|
|
||||||
for name in modules.keys():
|
for name in modules.keys():
|
||||||
ver, arch = name.split(".")[-2:]
|
ver, arch = name.split(".")[-2:]
|
||||||
|
|||||||
Reference in New Issue
Block a user