minor optimization

This commit is contained in:
Miroslav Stampar 2011-11-22 12:44:28 +00:00
parent 501fd85fa1
commit e33f70269b

View File

@ -86,13 +86,13 @@ class HashDB(object):
return return
self._cache_lock.acquire() self._cache_lock.acquire()
items = self._write_cache.items() _ = self._write_cache
self._write_cache.clear() self._write_cache = {}
self._cache_lock.release() self._cache_lock.release()
try: try:
self.beginTransaction() self.beginTransaction()
for hash_, value in items: for hash_, value in _.items():
while True: while True:
try: try:
try: try: