Fix output formatting (missing tuple).

Fix to be robust when container and object counts are None (this
happens if accounts can't be located).
This commit is contained in:
Chris Wedgwood 2011-01-18 12:08:22 -08:00
parent 5582fcd69b
commit 8a5f21b3ac

View File

@ -189,7 +189,7 @@ class Auditor(object):
self.container_obj_mismatch += 1
consistent = False
print " Different versions of %s/%s in container dbs." % \
name, obj['name']
(name, obj['name'])
if obj['last_modified'] > rec_d[obj_name]['last_modified']:
rec_d[obj_name] = obj
obj_counts = [int(header['x-container-object-count'])
@ -259,6 +259,7 @@ class Auditor(object):
self.account_container_mismatch += 1
consistent = False
print " Account databases don't agree on number of containers."
if cont_counts:
print " Max: %s, Min: %s" % (max(cont_counts), min(cont_counts))
obj_counts = [int(header['x-account-object-count'])
for header in headers]
@ -266,6 +267,7 @@ class Auditor(object):
self.account_object_mismatch += 1
consistent = False
print " Account databases don't agree on number of objects."
if obj_counts:
print " Max: %s, Min: %s" % (max(obj_counts), min(obj_counts))
containers = set()
for resp in responses.values():