Fix bug during create/delete clearing the cache
[invirt/packages/invirt-web.git] / webcommon.py
index 1b39a2c..4b58e6b 100644 (file)
@@ -48,7 +48,7 @@ class Global(object):
 
     def clear(self):
         """Clear the state so future accesses reload it."""
-        for attr in self.__dict__:
+        for attr in list(self.__dict__):
             if attr.startswith('__cache_'):
                 delattr(self, attr)