Explorar el Código

Support float values for --partsize with M or G suffix

master
JustAnotherArchivist hace 2 años
padre
commit
fdc3c3d69e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      ia-upload-stream

+ 2
- 2
ia-upload-stream Ver fichero

@@ -310,9 +310,9 @@ def main():
except ValueError:
pass
if x.endswith('M'):
return int(x[:-1]) * 1024 ** 2
return int(float(x[:-1]) * 1024 ** 2)
elif x.endswith('G'):
return int(x[:-1]) * 1024 ** 3
return int(float(x[:-1]) * 1024 ** 3)
raise ValueError

def parts(x):


Cargando…
Cancelar
Guardar