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:
1 parent
78e422f563
commit
fefe1fbc4d
1 file changed
+1
-1
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user