From: Scott Moser Subject: Do not throw exception on non-integer in snapshot volume_size Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/euca2ools/+bug/520707 Bug: http://code.google.com/p/boto/issues/detail?id=336 Bug-Debian: http://bugs.debian.org/510219 A Eucalyptus cloud is returning 'n/a' in the volumeSize field after a the following setup: 1. euca-create-volume --size 1 --zone $ZONE test1 VOLUME vol-5F220658 1 creating 2010-02-12T21:42:52.872Z 2. euca-create-snapshot vol-5F220658 3. euca-describe-snapshots invalid literal for int() with base 10: 'n/a' This changes boto to not raise exception in that case. volumeSize will be left as 'None' and the caller will have to address that (euca2ools do not reference this field at all). Most correctly, this should probably be fixed in eucalyptus but this makes boto resilliant to non-integer data in that field. === modified file 'boto/ec2/snapshot.py' --- boto/ec2/snapshot.py 2010-01-05 20:06:52 +0000 +++ boto/ec2/snapshot.py 2010-02-16 17:56:22 +0000 @@ -52,7 +52,8 @@ elif name == 'ownerId': self.owner_id = value elif name == 'volumeSize': - self.volume_size = int(value) + try: self.volume_size = int(value) + except: pass elif name == 'description': self.description = value else: