diff --git a/raftos/replicator.py b/raftos/replicator.py index f280e0d..282504f 100644 --- a/raftos/replicator.py +++ b/raftos/replicator.py @@ -12,7 +12,6 @@ async def wrapped(self, *args, **kwargs): result = await func(self, *args, **kwargs) return result - return wrapped diff --git a/raftos/storage.py b/raftos/storage.py index 7bcfbf3..280889d 100644 --- a/raftos/storage.py +++ b/raftos/storage.py @@ -7,7 +7,7 @@ class FileDict: """Persistent dict-like storage on a disk accessible by obj['item_name']""" def __init__(self, filename, serializer=None): - self.filename = filename + self.filename = filename.replace(':', '_') os.makedirs(os.path.dirname(self.filename), exist_ok=True) self.cache = {} @@ -76,7 +76,7 @@ class Log: UPDATE_CACHE_EVERY = 5 def __init__(self, node_id, serializer=None): - self.filename = os.path.join(config.log_path, '{}.log'.format(node_id)) + self.filename = os.path.join(config.log_path, '{}.log'.format(node_id.replace(':', '_'))) os.makedirs(os.path.dirname(self.filename), exist_ok=True) open(self.filename, 'a').close() diff --git a/setup.py b/setup.py index 6a9618a..c48c480 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup -__version__ = '0.2.1' +__version__ = '0.2.3' short_description = 'Raft replication in Python' requirements = [req.strip() for req in open('requirements.txt').readlines()]