Added bnf when adding a new concept + Started logging filtering
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user