1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +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

@ -82,7 +82,6 @@ def networks(request, compute_id):
return HttpResponseRedirect(reverse("network", args=[compute_id, data["name"]]))
elif form.has_error("name", "taken"):
failed(request, compute, f"Network {form.data['name'].strip()}", "add", "name already in use")
conn.close()
except libvirtError as lib_err:
messages.error(request, lib_err)
@ -300,6 +299,5 @@ def network(request, compute_id, pool):
lease["key"] = lease["mac"] if lease["ip"].version == 4 else lease["client_id"]
lease["ip_index"] = next((ip["index"] for ip in dhcp_networks
if ip["subnet"] and lease["ip"] in ip["subnet"]), None)
conn.close()
return render(request, "network.html", locals())