Merge "blockdevice.py: python3 fixes"

This commit is contained in:
Jenkins 2017-03-14 01:22:27 +00:00 committed by Gerrit Code Review
commit 429dad946f

View File

@ -133,7 +133,7 @@ class BlockDevice(object):
raise BlockDeviceSetupException(
"Top level config must contain exactly one key per entry")
logger.debug("Config entry [%s]" % config_entry)
cfg_obj_name = config_entry.keys()[0]
cfg_obj_name = list(config_entry.keys())[0]
cfg_obj_val = config_entry[cfg_obj_name]
# As the first step the configured objects are created