diff options
author | Brett Cannon <brett@python.org> | 2024-01-22 18:28:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 18:28:57 (GMT) |
commit | 5cd9c6b1fca549741828288febf9d5c13293847d (patch) | |
tree | e7a7d821bf3ca729fc341451beb869e504842aea | |
parent | 7fc51c3f6b7b13f88480557ff14bdb1c049f9a37 (diff) | |
download | cpython-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.py | 3 |
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) |