From 3a925af3c2af1035183f086080104e8f69d83b71 Mon Sep 17 00:00:00 2001 From: catborise Date: Fri, 13 Dec 2019 16:38:21 +0300 Subject: [PATCH] fix connection undefined error while getting volumes --- storages/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storages/views.py b/storages/views.py index b5708de..8b2ec8b 100644 --- a/storages/views.py +++ b/storages/views.py @@ -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))