Skip to content

Commit

Permalink
fix(vm): Check vm id against name and id
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolai Buchwitz <nb+github@tipi-net.de>
  • Loading branch information
nbuchwitz committed May 12, 2024
1 parent cf66cc2 commit 02bbe37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_pve.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def check_vm_status(self, idx: Union[str, int], **kwargs: str) -> None:

found = False
for vm in data:
if idx == vm.get("name", vm.get("vmid", None)):
if idx in (vm.get("name", None), vm.get("vmid", None)):
# Check if VM (default) or LXC
vm_type = "VM"
if vm["type"] == "lxc":
Expand Down

0 comments on commit 02bbe37

Please sign in to comment.