summaryrefslogtreecommitdiff
path: root/cli/app/thesaurus/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/thesaurus/api.py')
-rw-r--r--cli/app/thesaurus/api.py4
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