aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2024-03-29 19:18:42 +0800
committer苏向夜 <fu050409@163.com>2024-03-29 19:18:42 +0800
commit62bcf457939dd030c408e793443623f4ece2ef37 (patch)
tree6469c98facfbc032c300b4c2cdd8c3a85159363e /src
parente9a11bb9b9408fb3dcae852a1597da5910bb1053 (diff)
downloadipm-62bcf457939dd030c408e793443623f4ece2ef37.tar.gz
ipm-62bcf457939dd030c408e793443623f4ece2ef37.zip
feat(freeze): remove rmtree exception catch
Diffstat (limited to 'src')
-rw-r--r--src/ipm/utils/freeze.py7
1 files changed, 2 insertions, 5 deletions
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)