File tree 1 file changed +3
-13
lines changed
1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 14
14
15
15
script_path = Path (__file__ ).parent .resolve ()
16
16
sys .path .append (str (script_path .parent ))
17
- from utils import execute_cmd , getRepoBranchName
17
+ from utils import deleteFolder , execute_cmd , getRepoBranchName
18
18
19
19
mcu_list = [] # 'name'
20
20
io_list = [] # 'PIN','name'
130
130
]
131
131
132
132
133
- def rm_tree (pth : Path ):
134
- if pth .exists ():
135
- for child in pth .iterdir ():
136
- if child .is_file ():
137
- child .unlink ()
138
- else :
139
- rm_tree (child )
140
- pth .rmdir ()
141
-
142
-
143
133
def update_file (filePath , compile_pattern , subs ):
144
134
with open (filePath , "r+" , newline = "\n " ) as file :
145
135
fileContents = file .read ()
@@ -2625,7 +2615,7 @@ def manage_repo():
2625
2615
)
2626
2616
2627
2617
# Clean temporary dir
2628
- rm_tree (tmp_dir )
2618
+ deleteFolder (tmp_dir )
2629
2619
2630
2620
package_regex = re .compile (r"[\w][\w]([ANPQX])?$" )
2631
2621
flash_group_regex = re .compile (r"(.*)\((.*)\)(.*)" )
@@ -2710,4 +2700,4 @@ def manage_repo():
2710
2700
aggregate_dir ()
2711
2701
2712
2702
# Clean temporary dir
2713
- rm_tree (tmp_dir )
2703
+ deleteFolder (tmp_dir )
You can’t perform that action at this time.
0 commit comments