mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-01 17:22:16 +08:00
Fixed a bug where providing a cache_path did not really affect anything.
This commit is contained in:
1 parent
2d46d1e307
commit
88f8e172d5
2 files changed
+9
-10
No files matched your search
+2
-1
@@ -152,8 +152,9 @@ def clear_cache(cache_path=None):
|
||||
|
||||
|
||||
def _get_hashed_path(grammar, path, cache_path=None):
|
||||
directory = _get_cache_directory_path(cache_path=cache_path)
|
||||
|
||||
file_hash = hashlib.sha256(path.encode("utf-8")).hexdigest()
|
||||
directory = _get_cache_directory_path()
|
||||
return os.path.join(directory, '%s-%s.pkl' % (grammar.sha256, file_hash))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user