reconfigure() is only an issue if it changes something...

This commit is contained in:
Itamar Turner-Trauring 2023-02-20 12:44:03 -05:00
parent e3ad50a084
commit 31024ceb4c

View File

@ -755,9 +755,6 @@ async def reconfigure(reactor, request, node: TahoeProcess,
:return: ``None`` after the node configuration has been rewritten, the
node has been restarted, and the node is ready to provide service.
"""
# TODO reconfigure() seems to have issues on Windows. If you need to use it
# there, delete this assert and try to figure out what's going on...
assert not sys.platform.startswith("win")
happy, needed, total = params
config = node.get_config()
@ -789,6 +786,11 @@ async def reconfigure(reactor, request, node: TahoeProcess,
)
if changed:
# TODO reconfigure() seems to have issues on Windows. If you need to
# use it there, delete this assert and try to figure out what's going
# on...
assert not sys.platform.startswith("win")
# restart the node
print(f"Restarting {node.node_dir} for ZFEC reconfiguration")
await node.restart_async(reactor, request)