replace rmtree with rmdir

This commit is contained in:
z4yx 2020-04-19 20:03:02 +08:00
parent 518d14334b
commit 9fd9d571ad

View File

@ -218,9 +218,9 @@ def apt_mirror(base_url: str, dist: str, repo: str, arch: str, dest_base_dir: Pa
move_files_in(comp_tmp_dir, comp_dir) move_files_in(comp_tmp_dir, comp_dir)
move_files_in(dist_tmp_dir, dist_dir) move_files_in(dist_tmp_dir, dist_dir)
shutil.rmtree(str(pkgidx_tmp_dir)) pkgidx_tmp_dir.rmdir()
shutil.rmtree(str(comp_tmp_dir)) comp_tmp_dir.rmdir()
shutil.rmtree(str(dist_tmp_dir)) dist_tmp_dir.rmdir()
except: except:
traceback.print_exc() traceback.print_exc()
return 1 return 1