Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 2455

Show
Ignore:
Timestamp:
06/16/09 11:00:27
Author:
fumanchu
Message:

python3: bug in caching iteration.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/python3/cherrypy/lib/caching.py

    r2412 r2455  
    138138        while time: 
    139139            now = time.time() 
    140             for expiration_time, objects in self.expirations.items(): 
     140            # Must make a copy of expirations so it doesn't change size 
     141            # during iteration 
     142            for expiration_time, objects in list(self.expirations.items()): 
    141143                if expiration_time <= now: 
    142144                    for obj_size, obj_key in objects: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets