Skip to content

Commit 2d204fa

Browse files
committed
Replace logger.warn with logger.warning
1 parent 32ecd7d commit 2d204fa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/fosslight_source/convert_scancode.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def convert_json_to_excel(scancode_json, excel_name):
5151
file_list, key=lambda row: (''.join(row.licenses)))
5252
sheet_list["SRC_" + file_name] = [scan_item.get_row_to_print() for scan_item in file_list]
5353
except Exception as ex:
54-
logger.warn("Error parsing "+file+":"+str(ex))
54+
logger.warning("Error parsing "+file+":"+str(ex))
5555

5656
success_to_write, writing_msg = write_excel_and_csv(excel_name, sheet_list)
5757
logger.info("Writing excel :"+str(success_to_write)+ " "+writing_msg)
@@ -60,7 +60,7 @@ def convert_json_to_excel(scancode_json, excel_name):
6060

6161
except Exception as ex:
6262
success = False
63-
logger.warn(str(ex))
63+
logger.warning(str(ex))
6464

6565
scan_result_msg = str(success)+" "+msg
6666
_result_log["Scan Result"] = scan_result_msg.strip()
@@ -69,7 +69,7 @@ def convert_json_to_excel(scancode_json, excel_name):
6969
_str_final_result_log = yaml.safe_dump(_result_log, allow_unicode=True, sort_keys=True)
7070
logger.info(_str_final_result_log)
7171
except Exception as ex:
72-
logger.warn("Failed to print result log.: "+ str(ex))
72+
logger.warning("Failed to print result log.: "+ str(ex))
7373

7474
return file_list
7575

@@ -83,7 +83,7 @@ def get_detected_licenses_from_scancode(scancode_json_file):
8383
rc, file_list, msg= parsing_file_item(st_python["files"])
8484
logger.info("|---"+msg)
8585
except Exception as error:
86-
logger.warn("Parsing "+scancode_json_file+":"+str(error))
86+
logger.warning("Parsing "+scancode_json_file+":"+str(error))
8787
logger.info("|---Number of files detected: " + str(len(file_list)))
8888
return file_list
8989

src/fosslight_source/run_scancode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def run_scan(path_to_scan, output_file_name="",
133133
_str_final_result_log = yaml.safe_dump(_result_log, allow_unicode=True, sort_keys=True)
134134
logger.info(_str_final_result_log)
135135
except Exception as ex:
136-
logger.warn("Failed to print result log. "+ str(ex))
136+
logger.warning("Failed to print result log. "+ str(ex))
137137
return success, _result_log["Scan Result"], result_list
138138

139139

0 commit comments

Comments
 (0)