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:
parent
6da9a1eca9
commit
92bfb5a0de
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user