Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/fosslight_android/_binary_db_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
soimkim marked this conversation as resolved.
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
3 changes: 2 additions & 1 deletion src/fosslight_android/android_binary_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/fosslight_android/check_notice_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading