Fix a BytesWarning.

This commit is contained in:
Itamar Turner-Trauring 2021-04-12 10:25:15 -04:00
parent 2554112045
commit a0302c50da
1 changed files with 2 additions and 1 deletions

View File

@ -449,12 +449,13 @@ def create_node(config):
v = remote_config.get(k, None) v = remote_config.get(k, None)
if v is not None: if v is not None:
# we're faking usually argv-supplied options :/ # we're faking usually argv-supplied options :/
v_orig = v
if isinstance(v, str): if isinstance(v, str):
v = v.encode(get_io_encoding()) v = v.encode(get_io_encoding())
config[k] = v config[k] = v
if k not in sensitive_keys: if k not in sensitive_keys:
if k not in ['shares-happy', 'shares-total', 'shares-needed']: if k not in ['shares-happy', 'shares-total', 'shares-needed']:
print(" {}: {}".format(k, v), file=out) print(" {}: {}".format(k, v_orig), file=out)
else: else:
print(" {}: [sensitive data; see tahoe.cfg]".format(k), file=out) print(" {}: [sensitive data; see tahoe.cfg]".format(k), file=out)