Minor fixes

This commit is contained in:
Ivan Kravets
2017-12-16 01:07:03 +02:00
parent abbba7fe2e
commit 05081561c3
2 changed files with 7 additions and 1 deletions

View File

@ -160,6 +160,7 @@ class ContentCache(object):
os.makedirs(self.cache_dir)
self._lockfile = LockFile(self.cache_dir)
if self._lockfile.is_locked() and \
isfile(self._lockfile.lock_file) and \
(time() - getmtime(self._lockfile.lock_file)) > 10:
self._lockfile.break_lock()