Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Fixed a bug passing None to an instance of Path
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisveilleux committed Mar 10, 2021
1 parent 5996fdb commit 252dc43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mycroft/tts/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ class TextToSpeechCache:
def __init__(self, tts_config, tts_name, audio_file_type):
self.config = tts_config
self.tts_name = tts_name
self.persistent_cache_dir = Path(tts_config.get("preloaded_cache"))
if "preloaded_cache" in self.config:
self.persistent_cache_dir = Path(self.config["preloaded_cache"])
else:
self.persistent_cache_dir = None
self.temporary_cache_dir = Path(
get_cache_directory("tts/" + tts_name)
)
Expand Down

0 comments on commit 252dc43

Please sign in to comment.