Skip to content

Commit 139df79

Browse files
committed
Remove input file name filter code for convert
1 parent ca3d4e3 commit 139df79

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/fosslight_oss_pkg/_convert.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from datetime import datetime
1111
from pathlib import Path
1212
from yaml import safe_dump
13-
from fosslight_prechecker._help import print_help_msg
1413
from fosslight_util.constant import LOGGER_NAME
1514
from fosslight_util.set_log import init_log
1615
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
8483
if output_extension == '.xlsx':
8584
logger.error("Format error - can make only .yaml file")
8685
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
9188
elif base_path.endswith((".yaml", ".yml")):
9289
if output_extension == '.yaml':
9390
logger.error("Format error - can make only .xlsx file")
9491
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
10095
else:
10196
logger.error("Not support file name or extension - only support for FOSSLight-Report*.xlsx or oss-pkg-info*.yaml file")
10297
sys.exit(1)

0 commit comments

Comments
 (0)