Skip to content

Commit

Permalink
Ignore errors when deleting cache locks.
Browse files Browse the repository at this point in the history
  • Loading branch information
perliedman committed Jan 25, 2012
1 parent 6c39127 commit 28cf39f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TileStache/Caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,11 @@ def unlock(self, layer, coord, format):
Lock is implemented as an empty directory next to the tile file.
"""
lockpath = self._lockpath(layer, coord, format)
os.rmdir(lockpath)
try:
os.rmdir(lockpath)
except OSError:
# Ok, someone else deleted it already
pass

def read(self, layer, coord, format):
""" Read a cached tile.
Expand Down

0 comments on commit 28cf39f

Please sign in to comment.