diff --git a/python/mlx/distributed_run.py b/python/mlx/distributed_run.py index 3391ba620..9c946005b 100644 --- a/python/mlx/distributed_run.py +++ b/python/mlx/distributed_run.py @@ -172,7 +172,7 @@ def parse_hostfile(parser, hostfile): for i, h in enumerate(json.load(f)): hosts.append(Host(i, h["ssh"], h.get("ips", []))) return hosts - except e: + except Exception as e: parser.error(f"Failed to parse hostfile {str(hostfile)} ({str(e)})")