Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop creation of 'None' cache directory #2931

Merged
merged 1 commit into from Jun 28, 2021

Conversation

krisgesling
Copy link
Contributor

Description

The persistent_cache_dir is assigned None if no preloaded_cache exists.
None was then created as a directory when it's clearly not needed.

Re-ordered slightly to keep all the directory setting and checking together.

Fixes #2930
Thanks to @JarbasAI for the fix

How to test

  1. Set TTS.module to mimic which has no default preloaded cache directory
  2. Launch Mycroft
  3. See that a mycroft-core/None directory is created.
  4. Delete this directory, then apply this PR and repeat.

Contributor license agreement signed?

  • CLA

The persistent_cache_dir was assigned None if no preloaded_cache existed.
This was then created as a directory when it's clearly not needed.
@krisgesling krisgesling added the Type: Bug - quick Bug fixes that are quick to review and the implications of the change are clear and contained. label Jun 25, 2021
@devops-mycroft devops-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Jun 25, 2021
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@codecov-commenter
Copy link

Codecov Report

Merging #2931 (21eabce) into dev (8fa6508) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2931      +/-   ##
==========================================
- Coverage   52.62%   52.61%   -0.01%     
==========================================
  Files         123      123              
  Lines       11016    11016              
==========================================
- Hits         5797     5796       -1     
- Misses       5219     5220       +1     
Impacted Files Coverage Δ
mycroft/tts/cache.py 83.12% <100.00%> (ø)
mycroft/client/speech/listener.py 48.04% <0.00%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8fa6508...21eabce. Read the comment docs.

Copy link
Collaborator

@forslund forslund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, no more None directory :)

@krisgesling krisgesling merged commit fae1d3f into dev Jun 28, 2021
@krisgesling krisgesling deleted the bugfix/persistent-cache-none-dir branch June 28, 2021 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) Type: Bug - quick Bug fixes that are quick to review and the implications of the change are clear and contained.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tts cache creates "None" folder
4 participants