diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-03-23 17:22:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 17:22:42 -0400 |
commit | 04771d75a8670f07ae4c75b5892e3b795e9d1a07 (patch) | |
tree | 3303c2404de6cb7025e5300adaa0589a3effdb43 /cloudinit/config/cc_disk_setup.py | |
parent | a18338e99d0ab91f1f08b969bce8181938a284cc (diff) | |
download | vyos-cloud-init-04771d75a8670f07ae4c75b5892e3b795e9d1a07.tar.gz vyos-cloud-init-04771d75a8670f07ae4c75b5892e3b795e9d1a07.zip |
cc_disk_setup: fix RuntimeError (#270)
Addresses "Runtime Error: dictionary keys changed during iteration".
Co-authored-by: Noah Meyerhans <noahm@debian.org>
LP: #1868327
Diffstat (limited to 'cloudinit/config/cc_disk_setup.py')
-rw-r--r-- | cloudinit/config/cc_disk_setup.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |