use Path.unlink() instead of os.unlink()

This commit is contained in:
David Lechner
2022-06-16 10:39:05 -05:00
committed by GitHub
parent 526c5543e5
commit e6513a9b28
+1 -1
View File
@@ -536,7 +536,7 @@ def build(options: Options, tmp_path: Path) -> None:
# we're all done here; move it to output (overwrite existing)
if abi3_wheel is None:
try:
os.remove(build_options.output_dir / repaired_wheel.name)
(build_options.output_dir / repaired_wheel.name).unlink()
except OSError:
pass