|
10 | 10 | from datetime import datetime |
11 | 11 | from pathlib import Path |
12 | 12 | from yaml import safe_dump |
13 | | -from fosslight_prechecker._help import print_help_msg |
14 | 13 | from fosslight_util.constant import LOGGER_NAME |
15 | 14 | from fosslight_util.set_log import init_log |
16 | 15 | from fosslight_util.output_format import check_output_format |
@@ -84,19 +83,15 @@ def convert_report(base_path, output_name, format, need_log_file=True, sheet_nam |
84 | 83 | if output_extension == '.xlsx': |
85 | 84 | logger.error("Format error - can make only .yaml file") |
86 | 85 | sys.exit(1) |
87 | | - p = re.compile(r"[\s\S]*OSS[\s\S]*-Report[\s\S]*.xlsx", re.I) |
88 | | - if p.search(base_path): |
89 | | - convert_excel_mode = True |
90 | | - report_to_read = base_path |
| 86 | + convert_excel_mode = True |
| 87 | + report_to_read = base_path |
91 | 88 | elif base_path.endswith((".yaml", ".yml")): |
92 | 89 | if output_extension == '.yaml': |
93 | 90 | logger.error("Format error - can make only .xlsx file") |
94 | 91 | sys.exit(1) |
95 | | - p = re.compile(r"oss-pkg-info[\s\S]*.ya?ml", re.I) |
96 | | - if p.search(base_path): |
97 | | - oss_pkg_files = base_path.split(',') |
98 | | - convert_yml_mode = True |
99 | | - file_option_on = True |
| 92 | + oss_pkg_files = base_path.split(',') |
| 93 | + convert_yml_mode = True |
| 94 | + file_option_on = True |
100 | 95 | else: |
101 | 96 | logger.error("Not support file name or extension - only support for FOSSLight-Report*.xlsx or oss-pkg-info*.yaml file") |
102 | 97 | sys.exit(1) |
|
0 commit comments