From 5f81b9b809e0fcee87ecaac11e641cbc8584aa42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 1 Mar 2017 15:24:36 +0100 Subject: [PATCH] Fix refreshing VM cache on python3 dict.items() iterator don't like adding/removing items at the same time. --- qubesmgmt/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmgmt/app.py b/qubesmgmt/app.py index 8f9c3d9..eb1e381 100644 --- a/qubesmgmt/app.py +++ b/qubesmgmt/app.py @@ -63,7 +63,7 @@ class VMCollection(object): [vm_prop.split('=', 1) for vm_prop in props]) self._vm_list = new_vm_list - for name, vm in self._vm_objects.items(): + for name, vm in list(self._vm_objects.items()): if vm.name not in self._vm_list: # VM no longer exists del self._vm_objects[name]