diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index cf4c2ca3..36522694 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -121,6 +121,9 @@ def format_bytes_tohuman(databytes): def format_bytes_fromhuman(datahuman): + if not isinstance(datahuman, str): + datahuman = str(datahuman) + if not re.search(r"[A-Za-z]+", datahuman): dataunit = "B" datasize = float(datahuman)