mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
Fix vnc target redis crash
This commit is contained in:
parent
40ab5a31ee
commit
63a2bab3cd
2 changed files with 5 additions and 2 deletions
|
@ -254,7 +254,10 @@ def vm_power(vmid, action):
|
|||
vm = VM(vmid)
|
||||
vnc_token_key = f'vnc_token|{vmid}'
|
||||
# For deleting the token from redis later
|
||||
vnc_token = redis_conn.get(vnc_token_key).decode('utf-8')
|
||||
try:
|
||||
vnc_token = redis_conn.get(vnc_token_key).decode('utf-8')
|
||||
except AttributeError as e:
|
||||
print(f'Error: Could not get vnc_token:{e}')
|
||||
if action == 'start':
|
||||
vmconfig = vm.config
|
||||
usage_check = user.check_usage(vmconfig['cores'], vmconfig['memory'], 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue