From 04771d75a8670f07ae4c75b5892e3b795e9d1a07 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Mon, 23 Mar 2020 17:22:42 -0400 Subject: cc_disk_setup: fix RuntimeError (#270) Addresses "Runtime Error: dictionary keys changed during iteration". Co-authored-by: Noah Meyerhans LP: #1868327 --- cloudinit/config/cc_disk_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index 0796cb7b..45925755 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -163,7 +163,7 @@ def handle(_name, cfg, cloud, log, _args): def update_disk_setup_devices(disk_setup, tformer): # update 'disk_setup' dictionary anywhere were a device may occur # update it with the response from 'tformer' - for origname in disk_setup.keys(): + for origname in list(disk_setup): transformed = tformer(origname) if transformed is None or transformed == origname: continue -- cgit v1.2.3