From 1fd3ccb8a306c62408031df7237aae780a61049d Mon Sep 17 00:00:00 2001 From: forest Date: Mon, 15 Feb 2021 20:13:04 -0600 Subject: [PATCH] temporarily thow exception from check capsul addr --- capsulflask/console.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/capsulflask/console.py b/capsulflask/console.py index 644c66c..5411c46 100644 --- a/capsulflask/console.py +++ b/capsulflask/console.py @@ -28,19 +28,12 @@ def makeCapsulId(): return f"capsul-{lettersAndNumbers}" def double_check_capsul_address(id, ipv4, get_ssh_host_keys): - try: - result = current_app.config["HUB_MODEL"].get(id, get_ssh_host_keys) - if result.ipv4 != ipv4: - ipv4 = result.ipv4 - get_model().update_vm_ip(email=session["account"], id=id, ipv4=result.ipv4) - if get_ssh_host_keys: - get_model().update_vm_ssh_host_keys(email=session["account"], id=id, ssh_host_keys=result.ssh_host_keys) - except: - current_app.logger.error(f""" - the virtualization model threw an error in double_check_capsul_address of {id}: - {my_exec_info_message(sys.exc_info())}""" - ) - return None + result = current_app.config["HUB_MODEL"].get(id, get_ssh_host_keys) + if result.ipv4 != ipv4: + ipv4 = result.ipv4 + get_model().update_vm_ip(email=session["account"], id=id, ipv4=result.ipv4) + if get_ssh_host_keys: + get_model().update_vm_ssh_host_keys(email=session["account"], id=id, ssh_host_keys=result.ssh_host_keys) return result