Commit c91cc53e authored by Anael Beutot's avatar Anael Beutot Committed by Sébastien Luttringer
Browse files

vnc: handle case where tag vncport in invalid

parent f060f0bd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -87,7 +87,10 @@ class Command_vnc(TqlCommand):
            raise cmdError("No selected object")
        for vm in ans["objects"]:
            host_id = vm["p"]
            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: