replace iteritems with items

Under python 3 dictionaries do not have an iteritems() method. Replace
the call with items(), which works for both python 2 and 3.

Change-Id: I088940350c88a9c02f53fb578b37d2b600a05448
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 19:02:25 -04:00
parent f9766e1187
commit 41aa05b580
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class MonascaDriver(driver.MonitorBaseDriver):
"""
data = self._get_raw_data()
data2 = {}
for host, metric_results in data.iteritems():
for host, metric_results in data.items():
data2[host] = {}
for metric_name, metric_values in metric_results.iteritems():
data2[host][metric_name] = []