From: Brett Cannon Date: Mon, 22 Jan 2024 18:28:57 +0000 (-0800) Subject: Fix `wasi.py build` after adding the `clean` subcommand. ({GH-114447) X-Git-Tag: v3.13.0a4~377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cd9c6b1fca549741828288febf9d5c13293847d;p=thirdparty%2FPython%2Fcpython.git Fix `wasi.py build` after adding the `clean` subcommand. ({GH-114447) --- diff --git a/Tools/wasm/wasi.py b/Tools/wasm/wasi.py index e71b0b302a55..46ecae74a9ec 100644 --- a/Tools/wasm/wasi.py +++ b/Tools/wasm/wasi.py @@ -68,7 +68,8 @@ def subdir(working_dir, *, clean_ok=False): terminal_width = 80 print("⎯" * terminal_width) print("📁", working_dir) - if clean_ok and context.clean and working_dir.exists(): + if (clean_ok and getattr(context, "clean", False) and + working_dir.exists()): print(f"🚮 Deleting directory (--clean)...") shutil.rmtree(working_dir)