From 9c0fc0b4e82d83b30123f8df9beccc43ebac4dc6 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 21 Apr 2026 00:12:44 -0700 Subject: [PATCH] fix(whatsapp): remove shadowing shutil import in cmd_whatsapp (#13364) The re-pair branch had a redundant 'import shutil' inside cmd_whatsapp, which made shutil a function-local throughout the whole scope. The earlier 'shutil.which("npm")' call at the dependency-install step then crashed with UnboundLocalError before control ever reached the local import. shutil is already imported at module level (line 48), so the local import was dead code anyway. Drop it. --- hermes_cli/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hermes_cli/main.py b/hermes_cli/main.py index f88c42dda..adac54fb4 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -1330,8 +1330,6 @@ def cmd_whatsapp(args): except (EOFError, KeyboardInterrupt): response = "n" if response.lower() in ("y", "yes"): - import shutil - shutil.rmtree(session_dir, ignore_errors=True) session_dir.mkdir(parents=True, exist_ok=True) print(" ✓ Session cleared")