From 9f4303ba2ccaf3f6ae7ed7593b5067b491f113af Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 16 Jun 2022 10:40:48 -0500 Subject: [PATCH] use FileNotFoundError instead of OSError --- cibuildwheel/macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 18ccb04b0..91ba3f8e4 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -537,7 +537,7 @@ def build(options: Options, tmp_path: Path) -> None: if abi3_wheel is None: try: (build_options.output_dir / repaired_wheel.name).unlink() - except OSError: + except FileNotFoundError: pass shutil.move(str(repaired_wheel), build_options.output_dir)