diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-04-08 15:54:52 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-04-08 15:54:52 +0200 |
| commit | 9b41cb5b704279c62e058aba10bc0e4d664ceb6d (patch) | |
| tree | 7840705c5dacff7f7062f24d22791030a6709b37 | |
| parent | 4014a1a961f7daa984c36b85ab1903fad69f31d0 (diff) | |
fix paths
| -rw-r--r-- | cli/app/thesaurus/api.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/app/thesaurus/api.py b/cli/app/thesaurus/api.py index 89e5ad1..4509135 100644 --- a/cli/app/thesaurus/api.py +++ b/cli/app/thesaurus/api.py @@ -2,7 +2,6 @@ import os import re import time import requests -from hashlib import sha256 from app.utils.util import * from app.settings import app_cfg @@ -15,8 +14,7 @@ class Thesaurus: sha = sha256(word) hash_path = os.path.join(base_path, sha[0:2]) os.makedirs(hash_path, exist_ok=True) - clean_word = re.sub('[^0-9a-zA-Z]+', '*', word) - path = os.path.join(hash_path, clean_word + '.json') + path = os.path.join(hash_path, sha + '.json') if os.path.exists(path): return read_json(path) data = None |
