summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2024-01-22 18:28:57 (GMT)
committerGitHub <noreply@github.com>2024-01-22 18:28:57 (GMT)
commit5cd9c6b1fca549741828288febf9d5c13293847d (patch)
treee7a7d821bf3ca729fc341451beb869e504842aea
parent7fc51c3f6b7b13f88480557ff14bdb1c049f9a37 (diff)
downloadcpython-5cd9c6b1fca549741828288febf9d5c13293847d.zip
cpython-5cd9c6b1fca549741828288febf9d5c13293847d.tar.gz
cpython-5cd9c6b1fca549741828288febf9d5c13293847d.tar.bz2
Fix `wasi.py build` after adding the `clean` subcommand. ({GH-114447)
-rw-r--r--Tools/wasm/wasi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/wasm/wasi.py b/Tools/wasm/wasi.py
index e71b0b3..46ecae7 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)