1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

fix disk_size NoneType while determining vm disks size

This commit is contained in:
Ing. Jan KRCMAR 2017-06-26 14:45:12 +02:00
parent 437be0df99
commit fd87cfd86e

View file

@ -256,7 +256,8 @@ def instance(request, compute_id, vname):
cpu += int(conn.get_vcpu()) cpu += int(conn.get_vcpu())
memory += int(conn.get_memory()) memory += int(conn.get_memory())
for disk in conn.get_disk_device(): for disk in conn.get_disk_device():
disk_size += int(disk['size'])>>30 if disk['size']:
disk_size += int(disk['size'])>>30
ua = request.user.userattributes ua = request.user.userattributes
msg = "" msg = ""