Commit 390a0810 authored by Vincent Pelletier's avatar Vincent Pelletier

Use enumerate.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2554 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6465f3ef
...@@ -289,8 +289,7 @@ class MQ(object): ...@@ -289,8 +289,7 @@ class MQ(object):
# Expire old elements. # Expire old elements.
time = self._time time = self._time
for level in xrange(self._buffer_levels): for level, cache_buffer in enumerate(cache_buffers):
cache_buffer = cache_buffers[level]
head = cache_buffer.head head = cache_buffer.head
if head is not None and head.data.expire_time < time: if head is not None and head.data.expire_time < time:
del cache_buffer[head] del cache_buffer[head]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment