mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
fix disk_size NoneType while determining vm disks size
This commit is contained in:
parent
437be0df99
commit
fd87cfd86e
1 changed files with 2 additions and 1 deletions
|
@ -256,6 +256,7 @@ 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():
|
||||||
|
if disk['size']:
|
||||||
disk_size += int(disk['size'])>>30
|
disk_size += int(disk['size'])>>30
|
||||||
|
|
||||||
ua = request.user.userattributes
|
ua = request.user.userattributes
|
||||||
|
|
Loading…
Reference in a new issue