diff --git a/src/fosslight_android/_binary_db_controller.py b/src/fosslight_android/_binary_db_controller.py index 123b059..a39e1f2 100644 --- a/src/fosslight_android/_binary_db_controller.py +++ b/src/fosslight_android/_binary_db_controller.py @@ -166,13 +166,13 @@ def _post_binary_match(kb_url: str, kb_token: str, items: list) -> PostMatchResu except Exception: pass # Host responded → reachable; caller may continue with next chunks - logger.warning( + logger.debug( f"KB({kb_url}) reachable but binary match HTTP {ex.code}: {body or ex.reason}" ) return None, False except urllib.error.URLError as ex: - logger.warning(f"KB({kb_url}) Unreachable: {ex.reason if hasattr(ex, 'reason') else ex}") + logger.debug(f"KB({kb_url}) Unreachable: {ex.reason if hasattr(ex, 'reason') else ex}") return None, True except Exception as ex: - logger.warning(f"KB({kb_url}) binary match failed: {ex}") + logger.debug(f"KB({kb_url}) binary match failed: {ex}") return None, False diff --git a/src/fosslight_android/android_binary_analysis.py b/src/fosslight_android/android_binary_analysis.py index 04166f4..5e07088 100755 --- a/src/fosslight_android/android_binary_analysis.py +++ b/src/fosslight_android/android_binary_analysis.py @@ -584,7 +584,8 @@ def get_repositories_name(): # Get repository name from manifest first. read_success, manifest_content = read_file(".repo/manifest.xml", True) if read_success: - soup = BeautifulSoup(manifest_content, "lxml") + # manifest.xml is XML — use lxml XML parser (not HTML "lxml") + soup = BeautifulSoup(manifest_content, "lxml-xml") for remote_info in soup.findAll("remote"): if str(remote_info['review']).find("android-review.googlesource.com") > -1: # Only in case of aosp remote_is_aosp = True diff --git a/src/fosslight_android/check_notice_file.py b/src/fosslight_android/check_notice_file.py index 6ac7794..1e21878 100644 --- a/src/fosslight_android/check_notice_file.py +++ b/src/fosslight_android/check_notice_file.py @@ -144,7 +144,8 @@ def read_notice_file(notice_file_path): def parsing_notice_xml_format(notice_file_content): file_list = {} - soup = BeautifulSoup(notice_file_content, "lxml") + # NOTICE.xml is XML — use lxml XML parser (not HTML "lxml") + soup = BeautifulSoup(notice_file_content, "lxml-xml") for e in soup.findAll("file-name"): # NOTICE.xml line = e.text.strip()