Skip to content

Commit

Permalink
Suppress debug log of XML file
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Feb 4, 2021
1 parent 962aede commit d48ad94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion aqt/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class ArchiveDownloadError(Exception):
pass


class NoPackageFound(Exception):
pass


class TargetConfig:
def __init__(self, version, target, arch, os_name):
self.version = version
Expand Down Expand Up @@ -221,7 +225,7 @@ def _parse_update_xml(self, archive_url, target_packages):
self.archives.append(QtPackage(archive_name, package_url, archive, package_desc))
if len(self.archives) == 0:
self.logger.error("Specified packages are not found while parsing XML of package information!")
self.logger.debug(self.update_xml_text)
raise NoPackageFound

def get_archives(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions aqt/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

from aqt.archives import (ArchiveConnectionError, ArchiveDownloadError,
ArchiveListError, PackagesList, QtArchives,
SrcDocExamplesArchives, ToolArchives)
SrcDocExamplesArchives, ToolArchives, NoPackageFound)
from aqt.helper import Settings, altlink
from aqt.updater import Updater

Expand Down Expand Up @@ -223,7 +223,7 @@ def run_install(self, args):
except Exception:
self.logger.error("Connection to the download site failed. Aborted...")
exit(1)
except ArchiveDownloadError or ArchiveListError:
except ArchiveDownloadError or ArchiveListError or NoPackageFound:
exit(1)
target_config = qt_archives.get_target_config()
self.call_installer(qt_archives, output_dir, sevenzip)
Expand Down

0 comments on commit d48ad94

Please sign in to comment.