File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 1414
1515script_path = Path (__file__ ).parent .resolve ()
1616sys .path .append (str (script_path .parent ))
17- from utils import execute_cmd , getRepoBranchName
17+ from utils import deleteFolder , execute_cmd , getRepoBranchName
1818
1919mcu_list = [] # 'name'
2020io_list = [] # 'PIN','name'
130130]
131131
132132
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-
143133def update_file (filePath , compile_pattern , subs ):
144134 with open (filePath , "r+" , newline = "\n " ) as file :
145135 fileContents = file .read ()
@@ -2625,7 +2615,7 @@ def manage_repo():
26252615)
26262616
26272617# Clean temporary dir
2628- rm_tree (tmp_dir )
2618+ deleteFolder (tmp_dir )
26292619
26302620package_regex = re .compile (r"[\w][\w]([ANPQX])?$" )
26312621flash_group_regex = re .compile (r"(.*)\((.*)\)(.*)" )
@@ -2710,4 +2700,4 @@ def manage_repo():
27102700aggregate_dir ()
27112701
27122702# Clean temporary dir
2713- rm_tree (tmp_dir )
2703+ deleteFolder (tmp_dir )
You can’t perform that action at this time.
0 commit comments