Avoid crash when closing vms

Otherwise the size of dict change and Python raise
an exception.
This commit is contained in:
Julien Duponchelle 2015-01-23 17:33:58 +01:00
parent 017c5ac9f6
commit 7bed9f56bc

View File

@ -97,7 +97,7 @@ class BaseManager:
@asyncio.coroutine
def unload(self):
for uuid in self._vms.keys():
for uuid in list(self._vms.keys()):
try:
yield from self.delete_vm(uuid)
except Exception as e: