[Bug 517871] Re: euca-describe-volumes fails in lucid
Robert Collins
robertc at robertcollins.net
Wed Feb 10 00:03:38 GMT 2010
hasattr can swallow exceptions. I suggest
=== modified file 'bin/euca-describe-volumes'
--- bin/euca-describe-volumes 2009-10-12 09:11:57 +0000
+++ bin/euca-describe-volumes 2010-02-06 00:15:08 +0000
@@ -73,8 +73,11 @@
volume_string += '\t%s' % (volume.snapshot_id)
else:
volume_string += '\t'
- if volume.availabilityZone:
- volume_string += '\t%s' % volume.availabilityZone
+
+ az = getattr(volume, 'availabilityZone', object)
+ if az is object: az=volume.zone
+ if az: volume_string += '\t%s' % az
+
volume_string += '\t%s\t%s' % (volume.status, volume.create_time)
print 'VOLUME\t%s' % (volume_string)
if volume.status == 'in-use':
--
euca-describe-volumes fails in lucid
https://bugs.launchpad.net/bugs/517871
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to euca2ools in ubuntu.
More information about the Ubuntu-server-bugs
mailing list