Compare commits

...

2 Commits

2 changed files with 8 additions and 1 deletions

View File

@ -179,6 +179,10 @@ def upload_ova(zkhandler, pool, name, ova_size):
}
retcode = 400
return output, retcode
else:
ova_script = "default_ova"
else:
ova_script = "ova"
ova_archive = None
@ -414,7 +418,7 @@ def upload_ova(zkhandler, pool, name, ova_size):
None,
None,
userdata=None,
script="default_ova",
script=ova_script,
ova=name,
arguments=None,
)

View File

@ -121,6 +121,9 @@ def format_bytes_tohuman(databytes):
def format_bytes_fromhuman(datahuman):
if not isinstance(datahuman, str):
datahuman = str(datahuman)
if not re.search(r"[A-Za-z]+", datahuman):
dataunit = "B"
datasize = float(datahuman)