Documentation fixes.

This commit is contained in:
Itamar Turner-Trauring 2020-10-27 11:43:27 -04:00
parent 1a7bb06587
commit 207111fb9c
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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)