[commons.util] refactoring: always strips unit string in 'size_to_byte'

This commit is contained in:
Vinicius Moreira
2022-04-06 10:44:42 -03:00
parent 47cb969f1a
commit 887ae2da5c
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ def deep_update(source: dict, overrides: dict):
def size_to_byte(size: Union[float, int, str], unit: str, logger: Optional[Logger] = None) -> Optional[float]:
lower_unit = unit.lower()
lower_unit = unit.strip().lower()
if isinstance(size, str):
try: