Skip to content

Commit 1397fa7

Browse files
committed
Fix swift-recon
Make sure there is things in the row of ring_data.devs. Adjust else: for the driver information. Change-Id: I11a949dfa3f36691f86f3b7330d65e435c22da24
1 parent c3bc288 commit 1397fa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/swift-recon

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def getdevices():
2222
#todo , fitler by zone[s]
2323
ring_file = "/etc/swift/object.ring.gz"
2424
ring_data = Ring(ring_file)
25-
ips = set((n['ip'], n['port']) for n in ring_data.devs)
25+
ips = set((n['ip'], n['port']) for n in ring_data.devs if n)
2626
return ips
2727

2828

@@ -269,7 +269,7 @@ def disk_usage():
269269
averages.append(average)
270270
for percent in stats[url]:
271271
percents[percent] = percents.get(percent, 0) + 1
272-
else:
272+
else:
273273
print "-> %s: Error. No drive info available." % url
274274

275275
if len(lows) > 0:

0 commit comments

Comments
 (0)