mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-30 00:49:37 +00:00
fix divide remainder error for memory resize etc
This commit is contained in:
@@ -841,7 +841,7 @@ class wvmConnect(object):
|
||||
|
||||
def get_info(doc):
|
||||
mem = util.get_xpath(doc, "/domain/currentMemory")
|
||||
mem = int(mem) / 1024
|
||||
mem = int(mem) // 1024
|
||||
if raw_mem_size:
|
||||
mem = int(mem) * (1024 * 1024)
|
||||
cur_vcpu = util.get_xpath(doc, "/domain/vcpu/@current")
|
||||
@@ -875,7 +875,7 @@ class wvmConnect(object):
|
||||
|
||||
def get_info(ctx):
|
||||
mem = util.get_xpath(ctx, "/domain/currentMemory")
|
||||
mem = int(mem) / 1024
|
||||
mem = int(mem) // 1024
|
||||
cur_vcpu = util.get_xpath(ctx, "/domain/vcpu/@current")
|
||||
if cur_vcpu:
|
||||
vcpu = cur_vcpu
|
||||
|
||||
Reference in New Issue
Block a user