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:
1 parent
41ee798b0f
commit
ec4b148a71
1 file changed
+1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user