mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 23:38:18 +00:00
clarify comments
This commit is contained in:
@ -185,8 +185,6 @@ def read_config(basedir, portnumfile, generated_files=[]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# this method is async
|
|
||||||
# @defer.inlineCallbacks
|
|
||||||
def create_client(basedir=u".", _client_factory=None):
|
def create_client(basedir=u".", _client_factory=None):
|
||||||
"""
|
"""
|
||||||
Creates a new client instance (a subclass of Node).
|
Creates a new client instance (a subclass of Node).
|
||||||
@ -268,13 +266,13 @@ def create_client_from_config(config, _client_factory=None):
|
|||||||
def _sequencer(config):
|
def _sequencer(config):
|
||||||
"""
|
"""
|
||||||
:returns: a 2-tuple consisting of a new announcement
|
:returns: a 2-tuple consisting of a new announcement
|
||||||
sequence-number and (random) nonce. Reads and re-writes
|
sequence-number and random nonce (int, unicode). Reads and
|
||||||
configuration file "announcement-seqnum", starting at 1 if that
|
re-writes configuration file "announcement-seqnum" (starting at 1
|
||||||
file doesn't exist.
|
if that file doesn't exist).
|
||||||
"""
|
"""
|
||||||
seqnum_s = config.get_config_from_file("announcement-seqnum")
|
seqnum_s = config.get_config_from_file("announcement-seqnum")
|
||||||
if not seqnum_s:
|
if not seqnum_s:
|
||||||
seqnum_s = "0"
|
seqnum_s = u"0"
|
||||||
seqnum = int(seqnum_s.strip())
|
seqnum = int(seqnum_s.strip())
|
||||||
seqnum += 1 # increment
|
seqnum += 1 # increment
|
||||||
config.write_config_file("announcement-seqnum", "{}\n".format(seqnum))
|
config.write_config_file("announcement-seqnum", "{}\n".format(seqnum))
|
||||||
|
@ -416,8 +416,8 @@ def create_tub_options(config):
|
|||||||
overriding defaults with appropriate config from `config`
|
overriding defaults with appropriate config from `config`
|
||||||
instance.
|
instance.
|
||||||
"""
|
"""
|
||||||
# XXX this is code moved from Node -- but why are some options
|
# We can't unify the camelCase vs. dashed-name divide here,
|
||||||
# camelCase and some snake_case? can we FIXME?
|
# because these are options for Foolscap
|
||||||
tub_options = {
|
tub_options = {
|
||||||
"logLocalFailures": True,
|
"logLocalFailures": True,
|
||||||
"logRemoteFailures": True,
|
"logRemoteFailures": True,
|
||||||
|
Reference in New Issue
Block a user