nit: fix exception handling (#2066)

This commit is contained in:
Awni Hannun 2025-04-11 14:12:08 -07:00 committed by GitHub
parent 9c6953bda7
commit 68d1b3256b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)})")