Skip to content

Commit

Permalink
ceph-disk: Use true integer division in get_dev_size
Browse files Browse the repository at this point in the history
Signed-off-by: Anirudha Bose <[email protected]>
  • Loading branch information
onyb committed Aug 17, 2016
1 parent d0e29c7 commit f1bb72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ceph-disk/ceph_disk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def get_dev_size(dev, size='megabytes'):
try:
device_size = os.lseek(fd, 0, os.SEEK_END)
divider = dividers.get(size, 1024 * 1024) # default to megabytes
return device_size / divider
return device_size // divider
except Exception as error:
LOG.warning('failed to get size of %s: %s' % (dev, str(error)))
finally:
Expand Down

0 comments on commit f1bb72c

Please sign in to comment.