From 62bcf457939dd030c408e793443623f4ece2ef37 Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Fri, 29 Mar 2024 19:18:42 +0800 Subject: feat(freeze): remove rmtree exception catch --- src/ipm/utils/freeze.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ipm/utils/freeze.py b/src/ipm/utils/freeze.py index 1a3dd5c..846c6ec 100644 --- a/src/ipm/utils/freeze.py +++ b/src/ipm/utils/freeze.py @@ -65,7 +65,7 @@ def extract_ipk( source_path: StrPath, dist_path: StrPath, hash: Optional[str] = None, -) -> Optional[InfiniProject]: +) -> InfiniProject: ifp_path = Path(source_path).resolve() dist_path = Path(dist_path).resolve() @@ -82,10 +82,7 @@ def extract_ipk( dist_pkg_path = dist_path.joinpath(temp_pkg.default_name) if dist_pkg_path.exists(): - try: - shutil.rmtree(dist_pkg_path) - except Exception as err: - return error(str(err)) + shutil.rmtree(dist_pkg_path) shutil.move(arc_path, dist_path) -- cgit v1.2.3-70-g09d2