summaryrefslogtreecommitdiff
path: root/bin/swift-recon
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@chmouel.com>2011-09-26 15:30:18 +0200
committerChmouel Boudjnah <chmouel@chmouel.com>2011-09-26 15:31:48 +0200
commit1397fa799b64cc259a9a1b1b70b7b048f2182837 (patch)
treef95a54cd12d90224d6db8629f9938052713b7421 /bin/swift-recon
parentc3bc288d060e221e85d9d6beaa70928fcef77137 (diff)
downloadswift-1397fa799b64cc259a9a1b1b70b7b048f2182837.tar.gz
Fix swift-recon
Make sure there is things in the row of ring_data.devs. Adjust else: for the driver information. Change-Id: I11a949dfa3f36691f86f3b7330d65e435c22da24
Diffstat (limited to 'bin/swift-recon')
-rwxr-xr-xbin/swift-recon4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/swift-recon b/bin/swift-recon
index 4750ea064..8df268dae 100755
--- a/bin/swift-recon
+++ b/bin/swift-recon
@@ -22,7 +22,7 @@ def getdevices():
#todo , fitler by zone[s]
ring_file = "/etc/swift/object.ring.gz"
ring_data = Ring(ring_file)
- ips = set((n['ip'], n['port']) for n in ring_data.devs)
+ ips = set((n['ip'], n['port']) for n in ring_data.devs if n)
return ips
@@ -269,7 +269,7 @@ def disk_usage():
averages.append(average)
for percent in stats[url]:
percents[percent] = percents.get(percent, 0) + 1
- else:
+ else:
print "-> %s: Error. No drive info available." % url
if len(lows) > 0: