TTS: Invalidate broken file cache entries
If a cached file cannot be read by the TTS component, then it should be removed from the file cache--or it will remain broken.
This commit is contained in:
parent
41ee798b0f
commit
ec4b148a71
1 changed files with 1 additions and 0 deletions
|
@ -346,6 +346,7 @@ class SpeechManager(object):
|
|||
try:
|
||||
data = yield from self.hass.loop.run_in_executor(None, load_speech)
|
||||
except OSError:
|
||||
del self.file_cache[key]
|
||||
raise HomeAssistantError("Can't read {}".format(voice_file))
|
||||
|
||||
self._async_store_to_memcache(key, filename, data)
|
||||
|
|
Loading…
Add table
Reference in a new issue