]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix `wasi.py build` after adding the `clean` subcommand. ({GH-114447)
authorBrett Cannon <brett@python.org>
Mon, 22 Jan 2024 18:28:57 +0000 (10:28 -0800)
committerGitHub <noreply@github.com>
Mon, 22 Jan 2024 18:28:57 +0000 (10:28 -0800)
Tools/wasm/wasi.py

index e71b0b302a55615f4f2dfb08f7c3aa7e4af165f6..46ecae74a9ecea70ad6239378c4726d0475c4e42 100644 (file)
@@ -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)