def cleanup_stale_locks(self, lockfiles=None): for lockfile in lockfiles: date = self.get_date_from_lockfilename(lockfile) if date: self.wiki.set_date(date) try: StatusHtml.write_status(self.wiki, StatusHtml.status_line( self.wiki, aborted=True)) except Exception as ex: # may be no directory to write into, if # the dump failed early enough pass self.unlock(lockfiles)