Skip to content
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
pip install tox
- name: Run Tox
run: |
tox -e release_flake8
tox -e release
reuse:
runs-on: ubuntu-latest
Expand Down
11 changes: 3 additions & 8 deletions src/fosslight_android/android_binary_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Parsing NOTICE
from bs4 import BeautifulSoup
import subprocess
# For tlsh comparison
import tlsh
import hashlib
# For checking repository name
Expand All @@ -31,12 +30,9 @@
get_path_by_using_find
)
from .check_package_file import check_packaging_files
from .check_notice_file import (
run_notice_html_checklist,
from .check_notice_file import (
find_bin_in_notice,
read_notice_file,
create_additional_notice,
divide_notice_files_by_binary
read_notice_file
)
from ._binary_db_controller import get_oss_info_from_db
from ._common import (
Expand Down Expand Up @@ -891,8 +887,7 @@ def main():
# Print the result
result_log["Output Directory"] = python_script_dir
try:
#str_final_result_log = yaml.safe_dump(result_log, allow_unicode=True, sort_keys=True)
str_final_result_log = yaml.safe_dump(result_log, allow_unicode=True)
str_final_result_log = yaml.safe_dump(result_log, allow_unicode=True, sort_keys=True)
logger.info(str_final_result_log)
except Exception as ex:
logger.warning(f"Failed to print result log. : {ex}")
Expand Down
19 changes: 1 addition & 18 deletions src/fosslight_android/check_notice_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,29 +96,12 @@ def find_files_by_extension(path):
return files


#def read_notice_file(notice_file_path, notice_html_file):
def read_notice_file(notice_file_path):
final_notice_file = {}
# NOTICE.html need to be skipped the errors related to decode
encodings = ["latin-1", "utf-8", "utf-16"]
notice_files = []

'''
if notice_html_file != "":
notice_files = notice_html_file.split(",")
else:
if os.path.isfile(notice_file_path):
notice_files.append(notice_file_path)
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):
notice_file_path = os.path.dirname(notice_file_path)

if os.path.isdir(notice_file_path):
additional_notice_files = find_files_by_extension(notice_file_path)
if len(additional_notice_files) > 0:
notice_files.extend(additional_notice_files)
notice_files = list(set(notice_files))
'''


if os.path.isfile(notice_file_path):
notice_files.append(notice_file_path)
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):
Expand Down
Loading