Commit 89546f76 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent eb3a732f
......@@ -34,10 +34,8 @@ from golang.gcompat import qq
from ZODB.FileStorage import FileStorage
# WCFS represents connection to wcfs server.
# XXX name -> Connection ?
class WCFS(object):
# XXX + .zurl?
# Conn represents connection to wcfs server.
class Conn(object):
# .mountpoint path to mountpoint
# ._fwcfs /.wcfs opened to keep the server from going away (at least cleanly)
......@@ -88,7 +86,7 @@ def serve(zurl, exec_=False):
# otherwise it starts wcfs for zurl if autostart is True or (None and system
# default for autostart is True). XXX
#
# join(zurl) -> WCFS.
# join(zurl) -> Conn.
def join(zurl, autostart=None):
mntpt = _mntpt_4zurl(zurl)
......@@ -101,7 +99,7 @@ def join(zurl, autostart=None):
raise
else:
# already have it
return WCFS(mntpt, f)
return Conn(mntpt, f)
# XXX autostart=None processing
if not autostart:
......@@ -111,7 +109,7 @@ def join(zurl, autostart=None):
# _start starts wcfs server for ZODB @ zurl.
#
# _start(zurl) -> WCFS
# _start(zurl) -> Conn
def _start(zurl):
mntpt = _mntpt_4zurl(zurl)
log.info("wcfs: starting for %s ...", zurl)
......@@ -205,10 +203,10 @@ def _start(zurl):
if _ == 1:
if isinstance(_rx, file):
# mounted ok - return WCFS object
# mounted ok - return Conn object
f = _rx
startedok.close()
return WCFS(mntpt, f)
return Conn(mntpt, f)
# waitmounted error
err = _rx
......
......@@ -42,11 +42,11 @@ def setup_module():
def teardown_module():
testdb.teardown()
# make sure we start every test without wcfs server running
# make sure we start every test without wcfs server running.
def setup_function(f):
assert not os.path.exists(testmntpt)
# make sure we unmount wcfs after every test
# make sure we unmount wcfs after every test.
def teardown_function(f):
mounted = not subprocess.call(["mountpoint", "-q", testmntpt])
if mounted:
......
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