From cd20961abd20f01a14554c14d4f61a7f0d8deb88 Mon Sep 17 00:00:00 2001 From: janonymous Date: Sun, 5 Jul 2015 10:59:50 +0530 Subject: [PATCH] Replace dict.iteritems() with dict.items() in bin directory of swift. The iteritems() of Python 2 dictionaries has been renamed to items() on Python 3. Change-Id: I4bdc064c90bab56cd60f2dca2a5a78426ffbb31c --- bin/swift-dispersion-report | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/swift-dispersion-report b/bin/swift-dispersion-report index 2a1b0c1d48..b08d02717f 100755 --- a/bin/swift-dispersion-report +++ b/bin/swift-dispersion-report @@ -149,7 +149,7 @@ def container_dispersion_report(coropool, connpool, account, container_ring, if containers_listed - distinct_partitions: print 'There were %d overlapping partitions' % ( containers_listed - distinct_partitions) - for missing_copies, num_parts in container_copies_missing.iteritems(): + for missing_copies, num_parts in container_copies_missing.items(): print missing_string(num_parts, missing_copies, container_ring.replica_count) print '%.02f%% of container copies found (%d of %d)' % ( @@ -164,7 +164,7 @@ def container_dispersion_report(coropool, connpool, account, container_ring, 'pct_found': value, 'copies_found': copies_found, 'copies_expected': copies_expected} - for missing_copies, num_parts in container_copies_missing.iteritems(): + for missing_copies, num_parts in container_copies_missing.items(): results['missing_%d' % (missing_copies)] = num_parts return results @@ -260,7 +260,7 @@ def object_dispersion_report(coropool, connpool, account, object_ring, print 'There were %d overlapping partitions' % ( objects_listed - distinct_partitions) - for missing_copies, num_parts in object_copies_missing.iteritems(): + for missing_copies, num_parts in object_copies_missing.items(): print missing_string(num_parts, missing_copies, object_ring.replica_count) @@ -277,7 +277,7 @@ def object_dispersion_report(coropool, connpool, account, object_ring, 'copies_found': copies_found, 'copies_expected': copies_expected} - for missing_copies, num_parts in object_copies_missing.iteritems(): + for missing_copies, num_parts in object_copies_missing.items(): results['missing_%d' % (missing_copies,)] = num_parts return results