Skip to content

Commit 038f728

Browse files
committed
remove some options
Signed-off-by: Ethan Lee <[email protected]>
1 parent 962dea9 commit 038f728

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

src/fosslight_android/check_notice_file.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,25 +96,22 @@ def find_files_by_extension(path):
9696
return files
9797

9898

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

105-
if notice_html_file != "":
106-
notice_files = notice_html_file.split(",")
107-
else:
108-
if os.path.isfile(notice_file_path):
109-
notice_files.append(notice_file_path)
110-
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):
111-
notice_file_path = os.path.dirname(notice_file_path)
112-
113-
if os.path.isdir(notice_file_path):
114-
additional_notice_files = find_files_by_extension(notice_file_path)
115-
if len(additional_notice_files) > 0:
116-
notice_files.extend(additional_notice_files)
117-
notice_files = list(set(notice_files))
105+
if os.path.isfile(notice_file_path):
106+
notice_files.append(notice_file_path)
107+
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):
108+
notice_file_path = os.path.dirname(notice_file_path)
109+
110+
if os.path.isdir(notice_file_path):
111+
additional_notice_files = find_files_by_extension(notice_file_path)
112+
if len(additional_notice_files) > 0:
113+
notice_files.extend(additional_notice_files)
114+
notice_files = list(set(notice_files))
118115

119116
for file_name in notice_files:
120117
file_list = {}

0 commit comments

Comments
 (0)