euca-describe-volumes fails in lucid
Bug #517871 reported by
Scott Moser
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Eucalyptus |
Fix Released
|
Undecided
|
Unassigned | ||
euca2ools (Ubuntu) |
Fix Released
|
High
|
Neil Soman |
Bug Description
Binary package hint: euca2ools
euca-describe-
Changed in euca2ools (Ubuntu): | |
milestone: | none → lucid-alpha-3 |
tags: | added: patch |
Changed in eucalyptus: | |
status: | New → Fix Committed |
tags: | added: patch-acccepted-upstream |
Changed in eucalyptus: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
hasattr can swallow exceptions. I suggest
=== modified file 'bin/euca- describe- volumes' describe- volumes 2009-10-12 09:11:57 +0000 describe- volumes 2010-02-06 00:15:08 +0000 snapshot_ id) availabilityZon e: availabilityZon e
--- bin/euca-
+++ bin/euca-
@@ -73,8 +73,11 @@
volume_string += '\t%s' % (volume.
else:
volume_string += '\t'
- if volume.
- volume_string += '\t%s' % volume.
+
+ 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':