Skip to content

Commit c8a9bd1

Browse files
committed
Remove unnecessaries
Signed-off-by : Ethan Lee <[email protected]>
1 parent 7675802 commit c8a9bd1

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

src/fosslight_android/android_binary_analysis.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@
3131
get_path_by_using_find
3232
)
3333
from .check_package_file import check_packaging_files
34-
from .check_notice_file import (
35-
run_notice_html_checklist,
34+
from .check_notice_file import (
3635
find_bin_in_notice,
37-
read_notice_file,
38-
create_additional_notice,
39-
divide_notice_files_by_binary
36+
read_notice_file
4037
)
4138
from ._binary_db_controller import get_oss_info_from_db
4239
from ._common import (
@@ -891,8 +888,7 @@ def main():
891888
# Print the result
892889
result_log["Output Directory"] = python_script_dir
893890
try:
894-
#str_final_result_log = yaml.safe_dump(result_log, allow_unicode=True, sort_keys=True)
895-
str_final_result_log = yaml.safe_dump(result_log, allow_unicode=True)
891+
str_final_result_log = yaml.safe_dump(result_log, allow_unicode=True, sort_keys=True)
896892
logger.info(str_final_result_log)
897893
except Exception as ex:
898894
logger.warning(f"Failed to print result log. : {ex}")

src/fosslight_android/check_notice_file.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,29 +96,12 @@ def find_files_by_extension(path):
9696
return files
9797

9898

99-
#def read_notice_file(notice_file_path, notice_html_file):
10099
def read_notice_file(notice_file_path):
101100
final_notice_file = {}
102101
# NOTICE.html need to be skipped the errors related to decode
103102
encodings = ["latin-1", "utf-8", "utf-16"]
104103
notice_files = []
105-
106-
'''
107-
if notice_html_file != "":
108-
notice_files = notice_html_file.split(",")
109-
else:
110-
if os.path.isfile(notice_file_path):
111-
notice_files.append(notice_file_path)
112-
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):
113-
notice_file_path = os.path.dirname(notice_file_path)
114-
115-
if os.path.isdir(notice_file_path):
116-
additional_notice_files = find_files_by_extension(notice_file_path)
117-
if len(additional_notice_files) > 0:
118-
notice_files.extend(additional_notice_files)
119-
notice_files = list(set(notice_files))
120-
'''
121-
104+
122105
if os.path.isfile(notice_file_path):
123106
notice_files.append(notice_file_path)
124107
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):

0 commit comments

Comments
 (0)