Replacing six.iteritems() with .items()

We should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3* as well. And dict.items/keys will be more readable.

Change-Id: Ic532dc08e7712721e8be5eda83fc8fa2beb415e2
This commit is contained in:
rajat29 2017-04-04 15:49:57 +05:30
parent 6da9a1eca9
commit 92bfb5a0de
1 changed files with 1 additions and 3 deletions

View File

@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import six
import logging
import time
@ -73,7 +71,7 @@ def enabled_notifications():
def config(cfg):
global possible_notifiers, configured_notifiers, statsd_counter
formatted_config = {t.lower(): v for t, v in six.iteritems(cfg)}
formatted_config = {t.lower(): v for t, v in cfg.items()}
for notifier in possible_notifiers:
ntype = notifier.type.lower()
if ntype in formatted_config: