remove SSH tunnel and VNC stuff for deleted VMs

This commit is contained in:
Jordan Rodgers 2018-03-26 23:32:01 -04:00
parent e608c0dc10
commit 3f03d9ab69
2 changed files with 14 additions and 2 deletions

View file

@ -62,8 +62,8 @@ def add_vnc_target(port):
def delete_vnc_target(port):
targets = get_vnc_targets()
target = next((target for target in targets if target['port'] == port),
None)
target = next(
(target for target in targets if target['port'] == str(port)), None)
if target:
targets.remove(target)
target_file = open(app.config['WEBSOCKIFY_TARGET_FILE'], 'w')