Commit d793fdaf authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8fd9d48c
...@@ -37,11 +37,11 @@ from ZODB.FileStorage import FileStorage ...@@ -37,11 +37,11 @@ from ZODB.FileStorage import FileStorage
class WCFS(object): class WCFS(object):
# XXX + .zurl? # XXX + .zurl?
# .mountpoint path to mountpoint # .mountpoint path to mountpoint
# ._fwcfs /.wcfs opened # ._fwcfs /.wcfs opened to keep the server from going away (at least cleanly)
def __init__(self, mountpoint): def __init__(self, mountpoint, fwcfs):
self.mountpoint = mountpoint self.mountpoint = mountpoint
# XXX open a file to keep the server from going away (at least cleanly) self._fwcfs = fwcfs
# serve starts and runs wcfs server for ZODB @ zurl. # serve starts and runs wcfs server for ZODB @ zurl.
...@@ -160,6 +160,7 @@ def _start(zurl): ...@@ -160,6 +160,7 @@ def _start(zurl):
if e.errno != ENOENT: if e.errno != ENOENT:
raise raise
else: else:
# TODO read .wcfs and verify it = zurl
res = f res = f
break break
...@@ -193,7 +194,7 @@ def _start(zurl): ...@@ -193,7 +194,7 @@ def _start(zurl):
err = _rx err = _rx
if _ == 1: if _ == 1:
if not isinstance(_rx, file): if isinstance(_rx, file):
# mounted ok - return WCFS object # mounted ok - return WCFS object
f = _rx f = _rx
startedok.close() startedok.close()
......
...@@ -40,7 +40,7 @@ def test_join(): ...@@ -40,7 +40,7 @@ def test_join():
wcfs.join(zurl, autostart=False) wcfs.join(zurl, autostart=False)
wc = wcfs._start(zurl) wc = wcfs._start(zurl)
assert isinstance(wcfs.WCFS) assert isinstance(wc, wcfs.WCFS)
#wc = wcfs.join(zurl, autostart=False) #wc = wcfs.join(zurl, autostart=False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment