else:
self._remove_from_cache(name, size, meta_time)
else:
- file_dir = misc.find_file(name, size, meta_time)
+ file_dir = misc.find_file(self._base_dir, name, size, meta_time,
+ self._exclude_dir)
if file_dir:
self._clean_cache()
self._add_to_cache(name, size, meta_time, file_dir)
def _clean_cache(self):
c = self._conn.cursor()
- c.execute("DELETE FROM cache WHERE access_time<?", (int(time.time()) - 604800))
+ c.execute("DELETE FROM cache WHERE access_time<?", (int(time.time()) - 604800,))
self._conn.commit()
def _create_db(self):