From e5d75c0994f4562f9b328d4826cb76146509d9a0 Mon Sep 17 00:00:00 2001 From: Marc Mance Date: Thu, 30 May 2024 16:58:45 -0400 Subject: [PATCH] correct conversion --- topstat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/topstat.py b/topstat.py index c448e03..1023576 100644 --- a/topstat.py +++ b/topstat.py @@ -59,7 +59,8 @@ def convert_to_megabytes(data_size): breakpoint() try: - size, unit = data_size.upper().split() + unit = data_size[-1].upper() + size = data_size[:-1] size = float(size) except (ValueError, AttributeError): return None