From fdc3c3d69ed956890e0778142aad839e8ef8869a Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Tue, 18 Jan 2022 00:19:38 +0000 Subject: [PATCH] Support float values for --partsize with M or G suffix --- ia-upload-stream | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ia-upload-stream b/ia-upload-stream index 9f76d94..c82bbc5 100755 --- a/ia-upload-stream +++ b/ia-upload-stream @@ -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):