mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
reformat multiline strings; don't output "storage.plugins = None"
This commit is contained in:
parent
5d93b51e28
commit
09ea172b94
@ -307,13 +307,18 @@ class UseNode(object):
|
||||
if self.plugin_config is None:
|
||||
plugin_config_section = ""
|
||||
else:
|
||||
plugin_config_section = """
|
||||
[storageclient.plugins.{storage_plugin}]
|
||||
{config}
|
||||
""".format(
|
||||
storage_plugin=self.storage_plugin,
|
||||
config=format_config_items(self.plugin_config),
|
||||
)
|
||||
plugin_config_section =
|
||||
"[storageclient.plugins.{storage_plugin}]\n"
|
||||
"{config}\n"
|
||||
.format(
|
||||
storage_plugin=self.storage_plugin,
|
||||
config=format_config_items(self.plugin_config),
|
||||
)
|
||||
|
||||
if self.storage_plugin is None:
|
||||
plugins = ""
|
||||
else:
|
||||
plugins = "storage.plugins = {}".format(self.storage_plugin)
|
||||
|
||||
write_introducer(
|
||||
self.basedir,
|
||||
@ -340,18 +345,17 @@ class UseNode(object):
|
||||
self.config = config_from_string(
|
||||
self.basedir.asTextMode().path,
|
||||
"tub.port",
|
||||
"""
|
||||
[node]
|
||||
{node_config}
|
||||
|
||||
[client]
|
||||
storage.plugins = {storage_plugin}
|
||||
{plugin_config_section}
|
||||
""".format(
|
||||
storage_plugin=self.storage_plugin,
|
||||
node_config=format_config_items(node_config),
|
||||
plugin_config_section=plugin_config_section,
|
||||
)
|
||||
"[node]\n"
|
||||
"{node_config}\n"
|
||||
"\n"
|
||||
"[client]\n"
|
||||
"{plugins}\n"
|
||||
"{plugin_config_section}\n"
|
||||
.format(
|
||||
plugins=plugins,
|
||||
node_config=format_config_items(node_config),
|
||||
plugin_config_section=plugin_config_section,
|
||||
)
|
||||
)
|
||||
|
||||
def create_node(self):
|
||||
|
Loading…
Reference in New Issue
Block a user