1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 01:16:10 +00:00

refactor(vrtManager): remove the wvmConnect.close() that did nothing

Its body was a pass: connections are kept by the connection manager, not closed per object. The calls to it, and the finally blocks and None guards that only called it, are removed.
This commit is contained in:
catborise 2026-11-08 12:19:29 +03:00
parent 4d37e65c03
commit faa896ca54
11 changed files with 10 additions and 60 deletions

View file

@ -64,7 +64,6 @@ def interfaces(request, compute_id):
form.add_error(None, str(err))
else:
return HttpResponseRedirect(reverse("interface", args=[compute_id, data["name"]]))
conn.close()
except libvirtError as lib_err:
messages.error(request, lib_err)
@ -110,7 +109,6 @@ def interface(request, compute_id, iface):
vm_ids = dict(Instance.objects.filter(compute=compute, name__in=[vm["vm"] for vm in vms]).values_list("name", "id"))
for vm in vms:
vm["id"] = vm_ids.get(vm["vm"])
conn.close()
except libvirtError as lib_err:
messages.error(request, lib_err)