Changeset 797 for trunk


Ignore:
Timestamp:
Jul 30, 2008, 10:16:51 PM (16 years ago)
Author:
geofft
Message:

VNC: Catch the error when the VM is off and there is no host

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r770 r797  
    258258    token = cPickle.dumps(token)
    259259    token = base64.urlsafe_b64encode(token)
    260     port = 10003 + [config_host["hostname"] for config_host in invirt_config["hosts"]
    261         ].index(controls.listHost(machine))
     260    host = controls.listHost(machine)
     261    if host:
     262        port = 10003 + [config_host["hostname"] for config_host in invirt_config["hosts"]
     263            ].index(controls.listHost(machine))
     264    else:
     265        port = 5900 # dummy
    262266
    263267    status = controls.statusInfo(machine)
Note: See TracChangeset for help on using the changeset viewer.