diff --git a/lib/utils/hashdb.py b/lib/utils/hashdb.py index bb2e0fa6e..a77b8390c 100644 --- a/lib/utils/hashdb.py +++ b/lib/utils/hashdb.py @@ -86,13 +86,13 @@ class HashDB(object): return self._cache_lock.acquire() - items = self._write_cache.items() - self._write_cache.clear() + _ = self._write_cache + self._write_cache = {} self._cache_lock.release() try: self.beginTransaction() - for hash_, value in items: + for hash_, value in _.items(): while True: try: try: