From 207111fb9c54a7c5f4cf0646b90711a6fa0d84d1 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 27 Oct 2020 11:43:27 -0400 Subject: [PATCH] Documentation fixes. --- src/allmydata/node.py | 4 ++-- src/allmydata/util/configutil.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 1aa28a378..ad76a64e1 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -638,8 +638,8 @@ def _tub_portlocation(config): new_locations.append(loc) location = ",".join(new_locations) - # Lacking this, Python 2 blows up in PB when it is confused by a Unicode - # FURL. + # Lacking this, Python 2 blows up in Foolscap when it is confused by a + # Unicode FURL. location = location.encode("utf-8") return tubport, location diff --git a/src/allmydata/util/configutil.py b/src/allmydata/util/configutil.py index a80921972..55769487f 100644 --- a/src/allmydata/util/configutil.py +++ b/src/allmydata/util/configutil.py @@ -1,7 +1,7 @@ """ Read/write config files. -Configuration is returned as native strings. +Configuration is returned as Unicode strings. Ported to Python 3. """ @@ -32,11 +32,11 @@ class UnknownConfigError(Exception): def get_config(tahoe_cfg): """Load the config, returning a ConfigParser. - Configuration is returned as native strings. + Configuration is returned as Unicode strings. """ config = ConfigParser(strict=False) - # Byte Order Mark is an optional garbage byte you sometimes get at the - # start of UTF-8 encoded files. Especially on Windows. Skip it by using + # Byte Order Mark is an optional garbage code point you sometimes get at + # the start of UTF-8 encoded files. Especially on Windows. Skip it by using # utf-8-sig. https://en.wikipedia.org/wiki/Byte_order_mark with open(tahoe_cfg, "r", encoding="utf-8-sig") as f: config.read_file(f)