From 3b439040a937a8a3cf050b177bc7372029090d3c Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Sat, 20 Aug 2022 00:27:04 +0200 Subject: [PATCH] Cast esplicito per parametri configurati come numeri. --- libvirt-python/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-python/__main__.py b/libvirt-python/__main__.py index eaea592..3eb24f2 100644 --- a/libvirt-python/__main__.py +++ b/libvirt-python/__main__.py @@ -19,7 +19,7 @@ baseimg = lv.Volume("base-image", volume = lv.Volume("disk", base_volume_id = baseimg.id, pool = pool.name, - size = config.require("disksize") * 1024 ** 3 + size = int(config.require("disksize")) * 1024 ** 3 ) # Stream configuration files @@ -39,7 +39,7 @@ vm = lv.Domain("debian11", ) ], cloudinit = cloudinit.id, disks = [ lv.DomainDiskArgs(volume_id = volume.id) ], - memory = config.require("memory"), + memory = int(config.require("memory")), network_interfaces = [ lv.DomainNetworkInterfaceArgs( network_name = "default", wait_for_lease = True