Fixed some swift-recon typos

Change-Id: Ibe4b59a90b82742b70b00353d22aedd972bbeb59
This commit is contained in:
gholt 2013-02-08 20:19:48 +00:00
parent f7ded57cfc
commit 0640a61776

View File

@ -309,7 +309,7 @@ class SwiftRecon(object):
else: else:
print "[%s] - No hosts returned valid data." % k print "[%s] - No hosts returned valid data." % k
if least_recent_url is not None: if least_recent_url is not None:
host = urlparse(url).netloc host = urlparse(least_recent_url).netloc
if not least_recent_time: if not least_recent_time:
print 'Oldest completion was NEVER by %s.' % host print 'Oldest completion was NEVER by %s.' % host
else: else:
@ -320,7 +320,7 @@ class SwiftRecon(object):
time.gmtime(least_recent_time)), time.gmtime(least_recent_time)),
elapsed, elapsed_unit, host) elapsed, elapsed_unit, host)
if most_recent_url is not None: if most_recent_url is not None:
host = urlparse(url).netloc host = urlparse(most_recent_url).netloc
elapsed = time.time() - most_recent_time elapsed = time.time() - most_recent_time
elapsed, elapsed_unit = seconds2timeunit(elapsed) elapsed, elapsed_unit = seconds2timeunit(elapsed)
print 'Most recent completion was %s (%d %s ago) by %s.' % ( print 'Most recent completion was %s (%d %s ago) by %s.' % (
@ -364,7 +364,7 @@ class SwiftRecon(object):
else: else:
print "[replication_time] - No hosts returned valid data." print "[replication_time] - No hosts returned valid data."
if least_recent_url is not None: if least_recent_url is not None:
host = urlparse(url).netloc host = urlparse(least_recent_url).netloc
if not least_recent_time: if not least_recent_time:
print 'Oldest completion was NEVER by %s.' % host print 'Oldest completion was NEVER by %s.' % host
else: else:
@ -375,7 +375,7 @@ class SwiftRecon(object):
time.gmtime(least_recent_time)), time.gmtime(least_recent_time)),
elapsed, elapsed_unit, host) elapsed, elapsed_unit, host)
if most_recent_url is not None: if most_recent_url is not None:
host = urlparse(url).netloc host = urlparse(most_recent_url).netloc
elapsed = time.time() - most_recent_time elapsed = time.time() - most_recent_time
elapsed, elapsed_unit = seconds2timeunit(elapsed) elapsed, elapsed_unit = seconds2timeunit(elapsed)
print 'Most recent completion was %s (%d %s ago) by %s.' % ( print 'Most recent completion was %s (%d %s ago) by %s.' % (