Skip to content

Commit

Permalink
Fix: variable become undefined when extension not exist or connection…
Browse files Browse the repository at this point in the history
… error

- Fixed the issue #867

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Dec 24, 2024
1 parent f914397 commit 107dbc2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions aqt/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,12 @@ def _get_archives_base(self, name, target_packages):
try:
extensions_xml_text = self._download_update_xml(extensions_xml_url, True)
except ArchiveDownloadError:
# In case _download_update_xml ignores the hash and tries to get the url.
# In case _download_update_xml failed to get the url because of no extension.
pass
if extensions_xml_text:
self.logger.info("Found extension {}".format(ext))
update_xmls.append(UpdateXmls(extensions_target_folder, extensions_xml_text))
else:
if extensions_xml_text:
self.logger.info("Found extension {}".format(ext))
update_xmls.append(UpdateXmls(extensions_target_folder, extensions_xml_text))

self._parse_update_xmls(update_xmls, target_packages)

Expand Down

0 comments on commit 107dbc2

Please sign in to comment.