mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 23:38:18 +00:00
docstring improvements
This commit is contained in:
@ -163,6 +163,13 @@ class Terminator(service.Service):
|
||||
|
||||
|
||||
def read_config(basedir, portnumfile, generated_files=[]):
|
||||
"""
|
||||
Read and validate configuration for a client-style Node. See
|
||||
:method:`allmydata.node.read_config` for parameter meanings (the
|
||||
only difference here is we pass different validation data)
|
||||
|
||||
:returns: :class:`allmydata.node._Config` instance
|
||||
"""
|
||||
return node.read_config(
|
||||
basedir, portnumfile,
|
||||
generated_files=generated_files,
|
||||
@ -175,9 +182,14 @@ def create_client(basedir=u".", _client_factory=None):
|
||||
"""
|
||||
Creates a new client instance (a subclass of Node).
|
||||
|
||||
:param basedir: the node directory
|
||||
:param unicode basedir: the node directory (which may not exist yet)
|
||||
|
||||
:param _client_factory: for testing; the class to instantiate
|
||||
:param _client_factory: (for testing) a callable that returns an
|
||||
instance of :class:`allmydata.node.Node` (or a subclass). By default
|
||||
this is :class:`allmydata.client._Client`
|
||||
|
||||
:returns: :class:`allmydata.client._Client` instance (or whatever
|
||||
`_client_factory` returns)
|
||||
"""
|
||||
node.create_node_dir(basedir, CLIENT_README)
|
||||
config = read_config(basedir, u"client.port")
|
||||
|
Reference in New Issue
Block a user