From b04c58eca4ee8ea2cadaa656f93a3ee015f41c83 Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Mon, 13 Mar 2017 19:28:05 +1100
Subject: [PATCH] blockdevice.py: python3 fixes

keys() is an iterator in python3, so we need to make it list before
finding the first element

Change-Id: Ic158c7b2901c1a34ff417d3432fcefed4760ce24
---
 diskimage_builder/block_device/blockdevice.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diskimage_builder/block_device/blockdevice.py b/diskimage_builder/block_device/blockdevice.py
index ad337c677..897c0d4bc 100644
--- a/diskimage_builder/block_device/blockdevice.py
+++ b/diskimage_builder/block_device/blockdevice.py
@@ -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