Skip to content

Commit

Permalink
ci: adopted db models to work with python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
audrium committed Nov 5, 2020
1 parent 3348488 commit 63cb814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reana_db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def _human_readable_bytes(bytes_):
units = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
digits = 2
k = 1024
unit_index = math.floor(math.log(bytes_) / math.log(k))
unit_index = int(math.floor(math.log(bytes_) / math.log(k)))

converted_value = round(bytes_ / math.pow(k, unit_index), digits)
return "{converted_value} {converted_unit}".format(
Expand Down

0 comments on commit 63cb814

Please sign in to comment.