Cast to int before comparing in ec2 validate_manifest()

This commit is contained in:
Anders Ingemann 2015-01-02 15:11:36 +01:00
parent 7310129f4e
commit 7f84e405f0

View file

@ -33,7 +33,7 @@ def validate_manifest(data, validator, error):
for key, partition in data['volume']['partitions'].iteritems():
if key != 'type':
volume_size += Bytes(partition['size'])
if volume_size % Bytes('1GiB') != 0:
if int(volume_size % Bytes('1GiB')) != 0:
msg = ('The volume size must be a multiple of 1GiB when using EBS backing')
error(msg, ['volume', 'partitions'])
else: