Skip to content

Commit eeb4237

Browse files
committed
ci(stm32variant): remove duplicate function
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 88dab2b commit eeb4237

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

CI/update/stm32variant.py

+3-13
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
script_path = Path(__file__).parent.resolve()
1616
sys.path.append(str(script_path.parent))
17-
from utils import execute_cmd, getRepoBranchName
17+
from utils import deleteFolder, execute_cmd, getRepoBranchName
1818

1919
mcu_list = [] # 'name'
2020
io_list = [] # 'PIN','name'
@@ -130,16 +130,6 @@
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-
143133
def 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

26302620
package_regex = re.compile(r"[\w][\w]([ANPQX])?$")
26312621
flash_group_regex = re.compile(r"(.*)\((.*)\)(.*)")
@@ -2710,4 +2700,4 @@ def manage_repo():
27102700
aggregate_dir()
27112701

27122702
# Clean temporary dir
2713-
rm_tree(tmp_dir)
2703+
deleteFolder(tmp_dir)

0 commit comments

Comments
 (0)