fix connection undefined error while getting volumes

This commit is contained in:
catborise
2019-12-13 16:38:21 +03:00
parent b91f1cc36b
commit 3a925af3c2

View File

@@ -226,7 +226,7 @@ def get_volumes(request, compute_id, pool):
compute.type,
pool)
conn.refresh()
data['vols'] = sorted(conn.get_volumes())
except libvirtError:
pass
data['vols'] = sorted(conn.get_volumes())
return HttpResponse(json.dumps(data))