Skip to content

Commit

Permalink
improve humanbytes
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe authored and rking32 committed Mar 3, 2022
1 parent b21281c commit f148620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userge/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def get_file_id_of_media(message: 'userge.Message') -> Optional[str]:
def humanbytes(size: float) -> str:
""" humanize size """
if not size:
return ""
return "0 B"
power = 1024
t_n = 0
power_dict = {0: ' ', 1: 'Ki', 2: 'Mi', 3: 'Gi', 4: 'Ti'}
Expand Down

0 comments on commit f148620

Please sign in to comment.