Fix py3 error in block-device

This is breaking the octavia py3 gates.
Introduced by: I7aa4fe0466e44846d8fa3194575d446fe4b5b2e6

Change-Id: I3d86482a2999197a60a81d42afc5ef7a6e71e313
This commit is contained in:
Adam Harwell 2017-05-04 15:55:22 -07:00
parent e21935626b
commit 196b44f38a

View File

@ -125,7 +125,7 @@ class BlockDevice(object):
raise BlockDeviceSetupException(
"Top level config must contain exactly one key per entry")
logger.debug("Config entry [%s]" % config_entry)
config_key = config_entry.keys()[0]
config_key = list(config_entry)[0]
config_value = config_entry[config_key]
name = config_value['name'] \
if 'name' in config_value else None