Skip to content

Commit 3ad2927

Browse files
authored
Merge pull request #112 from fosslight/develop
Add the package name to result in the missing file
2 parents ac9878f + a5feaaf commit 3ad2927

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/fosslight_source/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def main():
100100
if not success:
101101
logger.error(f"Format error. {msg}")
102102
sys.exit(1)
103-
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_{_start_time}.txt"),
103+
logger, _result_log = init_log(os.path.join(output_path, f"fosslight_log_src_{_start_time}.txt"),
104104
True, logging.INFO, logging.DEBUG, _PKG_NAME, path_to_scan)
105105

106106
if os.path.isdir(path_to_scan):
@@ -151,9 +151,9 @@ def create_report_file(_start_time, scanned_result, license_list, selected_scann
151151

152152
if output_file == "":
153153
if output_extension == _json_ext:
154-
output_file = f"fosslight_opossum_{_start_time}"
154+
output_file = f"fosslight_opossum_src_{_start_time}"
155155
else:
156-
output_file = f"fosslight_report_{_start_time}"
156+
output_file = f"fosslight_report_src_{_start_time}"
157157

158158
if scanned_result:
159159
scanned_result = sorted(scanned_result, key=lambda row: (''.join(row.licenses)))

src/fosslight_source/convert_scancode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def convert_json_to_output_report(scancode_json, output_file_name, need_license=
2929
lic_list = {}
3030
msg = ""
3131
success = True
32-
start_time = datetime.now().strftime('%Y%m%d_%H%M%S')
32+
start_time = datetime.now().strftime('%y%m%d_%H%M')
3333
_json_ext = ".json"
3434

3535
success, msg, output_path, output_file, output_extension = check_output_format(output_file_name, format)
@@ -41,7 +41,7 @@ def convert_json_to_output_report(scancode_json, output_file_name, need_license=
4141

4242
if output_file == "":
4343
if output_extension == _json_ext:
44-
output_file = "fosslight_opossum_" + start_time
44+
output_file = "fosslight_opossum_src_" + start_time
4545
else:
4646
output_file = "fosslight_report_src_" + start_time
4747
else:

src/fosslight_source/run_scancode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def run_scan(path_to_scan, output_file_name="",
4747
if not called_by_cli:
4848
if output_file == "":
4949
if output_extension == _json_ext:
50-
output_file = f"fosslight_opossum_{_start_time}"
50+
output_file = f"fosslight_opossum_src_{_start_time}"
5151
else:
5252
output_file = f"fosslight_report_src_{_start_time}"
5353

0 commit comments

Comments
 (0)