From 8ecd453efe4f41429d04dcc78b902d15ed9a00ce Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 5 Nov 2018 15:19:25 +0300 Subject: [PATCH] fix: initialize used_size variable. it causes error if instance disks are deleted. --- vrtManager/instance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vrtManager/instance.py b/vrtManager/instance.py index eb38096..681e192 100644 --- a/vrtManager/instance.py +++ b/vrtManager/instance.py @@ -252,8 +252,9 @@ class wvmInstance(wvmConnect): storage = None src_fl = None disk_format = None + used_size = None disk_size = None - + for disk in doc.xpath('/domain/devices/disk'): device = disk.xpath('@device')[0] if device == 'disk':