diff --git a/cccli/commands/vnc.py b/cccli/commands/vnc.py index e82a1135173d22bab06cd0a66207b5e8fe89ffa6..eb779c122594f09c2f28d2af935eaf7a4ddd3a42 100644 --- a/cccli/commands/vnc.py +++ b/cccli/commands/vnc.py @@ -87,7 +87,10 @@ class Command_vnc(TqlCommand): raise cmdError("No selected object") for vm in ans["objects"]: host_id = vm["p"] - dest_port = int(vm["vncport"]) + try: + dest_port = int(vm["vncport"]) + except ValueError: + raise cmdError('Invalid value for tag vncport') # check if we have the right to forward on this hypervisor ans2 = self.rpc.call("list", "id:%s" % host_id, method="forward") if len(ans2["objects"]) == 0: