Skip to content

Commit

Permalink
#11 fix windows filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
zhebrak committed Mar 24, 2017
1 parent a8d6366 commit 57a45f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion raftos/replicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ async def wrapped(self, *args, **kwargs):
result = await func(self, *args, **kwargs)

return result

return wrapped


Expand Down
4 changes: 2 additions & 2 deletions raftos/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down

0 comments on commit 57a45f9

Please sign in to comment.