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 retcode = 400
return output, retcode return output, retcode
else:
ova_script = "default_ova"
else:
ova_script = "ova"
ova_archive = None ova_archive = None
@ -414,7 +418,7 @@ def upload_ova(zkhandler, pool, name, ova_size):
None, None,
None, None,
userdata=None, userdata=None,
script="default_ova", script=ova_script,
ova=name, ova=name,
arguments=None, arguments=None,
) )

View File

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