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
2 changes: 1 addition & 1 deletion src/fosslight_android/_src_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def find_item_to_analyze(bin_info, output_path, start_time="", path_to_exclude=[
if source_path == analyzed_path and item_license == CONST_NULL:
item.set_license(analyzed_license)
except Exception as error:
logger.debug(f"failed to update license from src analysis:{error}")
logger.debug(f"Failed to update license from src analysis:{error}")

return bin_info

Expand Down
2 changes: 1 addition & 1 deletion src/fosslight_android/android_binary_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def main():

read_success, android_log_lines = read_file(ANDROID_LOG_FILE_NAME)
if not read_success:
logger.error("Fail to read a file:" + ANDROID_LOG_FILE_NAME)
logger.error("(-a option) Fail to read a file:" + ANDROID_LOG_FILE_NAME)
sys.exit(1)
else:
set_env_variables_from_result_log()
Expand Down
12 changes: 6 additions & 6 deletions src/fosslight_android/check_notice_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run_notice_html_checklist(binary_file, check_type, notice_file):
except IOError:
logger.info(CANNOT_FIND_MSG)
else:
logger.info("Fail to read a binary file:" + binary_file)
logger.info(f"Fail to read a binary file: {binary_file}")
return notice_file_list


Expand Down Expand Up @@ -280,22 +280,22 @@ def get_binary_notice_text(binary_file_array, notice_file_path):
def divide_notice_files_by_binary(notice_file_to_divide, result_file_path, now):
read_success, contents = read_file(notice_file_to_divide, True)
if read_success:
dir_name = "NOTICE_FILES_" + now
dir_name = f"NOTICE_FILES_{now}"
dir_name = os.path.join(result_file_path, dir_name)
try:
if not os.path.exists(dir_name):
os.makedirs(dir_name)
else:
logger.warn(dir_name + " folder already exists.")
logger.warn(f"{dir_name} folder already exists.")
except OSError:
logger.warn("Cannot create " + dir_name + " folder.")
logger.warn(f"Cannot create {dir_name} folder.")
return
os.chdir(dir_name)
items = parsing_notice_html_for_license_text(contents)
create_license_txt_files(items, "")
logger.warn(dir_name + " folder has been created.")
logger.warn(f"{dir_name} folder has been created.")
else:
logger.warn("Failed to read :" + notice_file_to_divide)
logger.warn(f"Failed to read: {notice_file_to_divide}")


def create_license_txt_files(file_list, result_file_path):
Expand Down
Loading