Closed klauer closed 2 years ago
Thanks, I agree with the changes.
Moved the try/except block to include cache load
The one thing that bugs me is that now it will always say "Loading grammar from cache ...", even when the cache file doesn't exist. At least, we should change it to "checking for cache for grammar", or something of the sort.
@MegaIng Mind also taking a look?
Anything else I can do to help move this along?
@klauer Sorry, I've been a little busy. I'll try to look into it this weekend.
Thanks for the PR!
Context
Closes #1178
Description
This is my attempt at fixing the issue I reported (#1178) regarding cache files generated by different users on the same system.
Consider this a proposal - I'd be happy to adjust it to your preference.
Three main changes were made:
$USER
(viagetpass.getuser()
) to the cache filename (77d8277)try/except
block to include cache load /open(cache_fn)
(1c36098)try/except
block and a similarlogger.exception
message (835e6923239ee2ecee9a6dc6637a2cd73065e38a)