Simply add the string we want

I must have been fixated on using `replace()`.
After already splitting the string, using the part we don't want seems silly.
This commit is contained in:
tcely authored and GitHub committed 2025-02-01 02:28:23 -05:00
1 parent 78e422f563
commit fefe1fbc4d
1 file changed
+1 -1
+1 -1
View File
@@ -10,5 +10,5 @@ def bytesformat(input):
output = filesizeformat(input)
if not (output and output.endswith('B', -1)):
return output
return output[: -1 ] + output[ -1 :].replace('B', 'iB', 1)
return output[: -1 ] + 'iB'