'Clean up expired sessions.'

def clean_up(self):

    now = self.now()
    for fname in os.listdir(self.storage_path):
        if (fname.startswith(self.SESSION_PREFIX) and (not fname.endswith(self.LOCK_SUFFIX))):
            path = os.path.join(self.storage_path, fname)
            self.acquire_lock(path)
            if self.debug:
                cherrypy.log('Cleanup    lock    acquired.', 'TOOLS.SESSIONS')
            try:
                contents = self._load(path)
                if (contents is not None):
                    (data, expiration_time) = contents
                    if (expiration_time < now):
                        os.unlink(path)
            finally:
                self.release_lock(path)
