Skip to content

Commit 932edfd

Browse files
committed
Fix the flake8 error
Signed-off-by: Jiyeong Seok <[email protected]>
1 parent 8eb8052 commit 932edfd

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/fosslight_source/convert_scancode.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ def convert_json_to_output_report(scancode_json, output_file_name, need_license=
3737
success, msg, output_path, output_file, output_extension = check_output_format(output_file_name, format)
3838
if success:
3939
if output_path == "":
40-
output_path = os.getcwd()
40+
output_path = os.getcwd()
4141
else:
4242
output_path = os.path.abspath(output_path)
43-
43+
4444
if output_file == "":
4545
if output_extension == _json_ext:
4646
output_file = "Opossum_input_" + start_time
47-
else:
47+
else:
4848
output_file = "FOSSLight-Report_" + start_time
4949
else:
5050
output_path = os.getcwd()
5151

5252
logger, result_log = init_log(os.path.join(output_path, "fosslight_src_log_" + start_time + ".txt"),
53-
True, logging.INFO, logging.DEBUG, _PKG_NAME)
53+
True, logging.INFO, logging.DEBUG, _PKG_NAME)
5454
if not success:
5555
logger.error("Fail to convert scancode: " + msg)
5656
return []

src/fosslight_source/run_scancode.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def run_scan(path_to_scan, output_file_name="",
8181
output_path = os.getcwd()
8282
else:
8383
output_path = os.path.abspath(output_path)
84-
84+
8585
if output_file == "":
8686
if output_extension == _json_ext:
8787
output_file = "Opossum_input_" + start_time
88-
else:
88+
else:
8989
output_file = "FOSSLight-Report_" + start_time
9090

9191
if _write_json_file:
@@ -94,7 +94,7 @@ def run_scan(path_to_scan, output_file_name="",
9494
output_json_file = ""
9595

9696
logger, _result_log = init_log(os.path.join(output_path, "fosslight_src_log_"+start_time+".txt"),
97-
True, logging.INFO, logging.DEBUG, _PKG_NAME, path_to_scan)
97+
True, logging.INFO, logging.DEBUG, _PKG_NAME, path_to_scan)
9898

9999
if path_to_scan == "":
100100
if _windows:
@@ -107,11 +107,11 @@ def run_scan(path_to_scan, output_file_name="",
107107
if os.path.isdir(path_to_scan):
108108
try:
109109
rc, results = cli.run_scan(path_to_scan, max_depth=100,
110-
strip_root=True, license=True,
111-
copyright=True, return_results=True,
112-
processes=num_cores,
113-
output_json_pp=output_json_file,
114-
only_findings=True, license_text=True)
110+
strip_root=True, license=True,
111+
copyright=True, return_results=True,
112+
processes=num_cores,
113+
output_json_pp=output_json_file,
114+
only_findings=True, license_text=True)
115115

116116
if not rc:
117117
msg = "Source code analysis failed."
@@ -138,8 +138,10 @@ def run_scan(path_to_scan, output_file_name="",
138138
sheet_list["matched_text"] = get_license_list_to_print(license_list)
139139

140140
output_file_without_ext = os.path.join(output_path, output_file)
141-
success_to_write, writing_msg = write_output_file(output_file_without_ext, output_extension, sheet_list, FL_SOURCE)
142-
logger.info("Writing Output file(" + output_file + output_extension + "):" + str(success_to_write) + " " + writing_msg)
141+
success_to_write, writing_msg = write_output_file(output_file_without_ext, output_extension,
142+
sheet_list, FL_SOURCE)
143+
logger.info("Writing Output file(" + output_file + output_extension + "):" + str(success_to_write)
144+
+ " " + writing_msg)
143145
if success_to_write:
144146
_result_log["Output file"] = output_file_without_ext + output_extension
145147

0 commit comments

Comments
 (0)