diff --git a/hermes_cli/gateway.py b/hermes_cli/gateway.py index a3896b5bbd0e5..f5627a661f175 100644 --- a/hermes_cli/gateway.py +++ b/hermes_cli/gateway.py @@ -279,9 +279,11 @@ def _matches_current_profile(command: str) -> bool: ["wmic", "process", "get", "ProcessId,CommandLine", "/FORMAT:LIST"], capture_output=True, text=True, + encoding="utf-8", + errors="ignore", timeout=10, ) - if result.returncode != 0: + if result.returncode != 0 or result.stdout is None: return [] current_cmd = "" for line in result.stdout.split("\n"):