clarify comments

This commit is contained in:
meejah 2018-09-04 14:56:50 -06:00
parent efce7b1f6a
commit a5287add80
2 changed files with 6 additions and 8 deletions

View File

@ -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):
"""
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):
"""
:returns: a 2-tuple consisting of a new announcement
sequence-number and (random) nonce. Reads and re-writes
configuration file "announcement-seqnum", starting at 1 if that
file doesn't exist.
sequence-number and random nonce (int, unicode). Reads and
re-writes configuration file "announcement-seqnum" (starting at 1
if that file doesn't exist).
"""
seqnum_s = config.get_config_from_file("announcement-seqnum")
if not seqnum_s:
seqnum_s = "0"
seqnum_s = u"0"
seqnum = int(seqnum_s.strip())
seqnum += 1 # increment
config.write_config_file("announcement-seqnum", "{}\n".format(seqnum))

View File

@ -416,8 +416,8 @@ def create_tub_options(config):
overriding defaults with appropriate config from `config`
instance.
"""
# XXX this is code moved from Node -- but why are some options
# camelCase and some snake_case? can we FIXME?
# We can't unify the camelCase vs. dashed-name divide here,
# because these are options for Foolscap
tub_options = {
"logLocalFailures": True,
"logRemoteFailures": True,