Replace .iteritems() with .items()
As mentioned in the developer's guide[0] and in a discussion[1], we shouldn't use six.iteritems() unless there's a good reason (eg large data set). Since there's no need to use six.iteritems() or dict.iteritems() in the two places where it is being used, this patch replaces them with items(). [0] http://docs.openstack.org/infra/manual/developers.html#peer-review [1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Change-Id: Iaf4ffc755293454a054fff3efffd5a30e1c18fd7
This commit is contained in:
parent
c437095245
commit
e05116288a
@ -506,7 +506,7 @@ def work_on_disk(dev, root_mb, swap_mb, ephemeral_mb, ephemeral_format,
|
||||
}
|
||||
|
||||
try:
|
||||
for part, part_dev in six.iteritems(uuids_to_return):
|
||||
for part, part_dev in uuids_to_return.items():
|
||||
if part_dev:
|
||||
uuids_to_return[part] = block_uuid(part_dev)
|
||||
|
||||
|
@ -74,7 +74,7 @@ class IronicException(Exception):
|
||||
# kwargs doesn't match a variable in the message
|
||||
# log the issue and the kwargs
|
||||
LOG.exception(_LE('Exception in string format operation'))
|
||||
for name, value in kwargs.iteritems():
|
||||
for name, value in kwargs.items():
|
||||
LOG.error("%s: %s" % (name, value))
|
||||
|
||||
if CONF.ironic_lib.fatal_exception_format_errors:
|
||||
|
Loading…
Reference in New Issue
Block a user