Skip to content

Commit c2653e2

Browse files
committed
support detect empty line in CSV config file
1 parent f469c2d commit c2653e2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

PAE.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
multiprocessing.freeze_support()
2222

23-
version = 'V1.12.24'
23+
version = 'V1.12.25'
2424

2525
class DemoClass(tk.Tk):
2626

src/atp_handler.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def analyse_merge_config(merge_config_file: str, textoutwin) -> List[Dict]:
4949
if index == 0:
5050
head_list = row
5151
elif len(row) > 0:
52+
if "".join(row) == "":
53+
break
5254
cur_config_dict = {
5355
"ATPFile": "",
5456
"CycleRange": None,
@@ -74,7 +76,13 @@ def analyse_merge_config(merge_config_file: str, textoutwin) -> List[Dict]:
7476
elif i == 4 or i == 7:
7577
cur_config_dict["PinName"] = item
7678
elif i == 5 or i == 8:
77-
cur_config_dict["CycleRange"] = process_input_cycles(item)
79+
try:
80+
cur_config_dict["CycleRange"] = process_input_cycles(item)
81+
except Exception as e:
82+
content = ",".join(row)
83+
textoutwin(f"Error: Cannot parse the cycle list, content: {content}")
84+
print(f"Error: Cannot parse the cycle list, content: {content}")
85+
cur_config_dict["CycleRange"] = []
7886
if "Pattern" not in item:
7987
tmp_dict = cur_config_dict.copy()
8088
config_list.append(tmp_dict)

0 commit comments

Comments
 (0)