Added bnf when adding a new concept + Started logging filtering

This commit is contained in:
2019-12-13 20:26:11 +01:00
parent 75c8793d53
commit c668cc46d2
29 changed files with 1487 additions and 190 deletions
+4 -1
View File
@@ -46,9 +46,9 @@ class SheerkaDataProviderIO:
class SheerkaDataProviderFileIO(SheerkaDataProviderIO):
log = logging.getLogger("FileIO")
def __init__(self, root):
self.log = logging.getLogger(self.__class__.__name__ + ".init")
root = path.abspath(path.join(path.expanduser("~"), ".sheerka")) \
if root is None \
else path.abspath(root)
@@ -180,10 +180,13 @@ def on_close(dictionary_io, file_path, stream):
:param stream:
:return:
"""
def decorator(func):
def wrapper(*args, **kwargs):
stream.seek(0)
dictionary_io.cache[file_path] = stream.read()
func(*args, **kwargs)
return wrapper
return decorator