[Tilecache] patch to fix stale lock warning exceptions

Paul Spencer pspencer at dmsolutions.ca
Tue Aug 21 13:45:10 EDT 2007


Index: /ms4w/apps/svn.tilecache.org/trunk/tilecache/TileCache/Cache.py
===================================================================
--- /ms4w/apps/svn.tilecache.org/trunk/tilecache/TileCache/Cache.py	 
(revision 114)
+++ /ms4w/apps/svn.tilecache.org/trunk/tilecache/TileCache/Cache.py	 
(working copy)
@@ -157,9 +157,9 @@
          try:
              st = os.stat(name)
              if st.st_ctime + self.stale < time.time():
-                warnings.warn("removing stale lock %s" % name)
+                warn("removing stale lock %s" % name)
                  # remove stale lock
-                self.unlock()
+                self.unlock(tile)
                  os.makedirs(name)
                  return True
          except OSError:



More information about the Tilecache mailing list