diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index f3884b25..a5d1a371 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -97,8 +97,8 @@ def format_bytes_tohuman(databytes): def format_bytes_fromhuman(datahuman): # Trim off human-readable character - dataunit = datahuman[-1] - datasize = int(datahuman[:-1]) + dataunit = str(datahuman)[-1] + datasize = int(str(datahuman)[:-1]) if not re.match('[A-Z]', dataunit): dataunit = 'B' datasize = int(datahuman)