mirror of https://github.com/aristocratos/bpytop
Fixed: units_to_bytes returning 0 if input value <10 and in bits
parent
10aea340ba
commit
8041ca1afb
|
@ -4747,8 +4747,8 @@ def units_to_bytes(value: str) -> int:
|
||||||
elif value.isdigit():
|
elif value.isdigit():
|
||||||
value_i = int(value)
|
value_i = int(value)
|
||||||
|
|
||||||
if bit: value_i = round(value_i / 8)
|
|
||||||
out = int(value_i) << (10 * mult)
|
out = int(value_i) << (10 * mult)
|
||||||
|
if bit: out = round(out / 8)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
out = 0
|
out = 0
|
||||||
return out
|
return out
|
||||||
|
|
Loading…
Reference in New Issue