mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-08 04:10:25 +00:00
different way to say 'all items okay'
This commit is contained in:
parent
aed5061a96
commit
b28ac6118b
@ -76,7 +76,8 @@ def _is_valid_section(section_name):
|
|||||||
"""
|
"""
|
||||||
return (
|
return (
|
||||||
section_name.startswith("storageserver.plugins.") or
|
section_name.startswith("storageserver.plugins.") or
|
||||||
section_name.startswith("storageclient.plugins.")
|
section_name.startswith("storageclient.plugins.") or
|
||||||
|
section_name in ("grid_managers", "grid_manager_certificates")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -93,8 +94,6 @@ _client_config = configutil.ValidConfiguration(
|
|||||||
"shares.total",
|
"shares.total",
|
||||||
"storage.plugins",
|
"storage.plugins",
|
||||||
),
|
),
|
||||||
"grid_managers": None, # means "any options valid"
|
|
||||||
"grid_manager_certificates": None,
|
|
||||||
"storage": (
|
"storage": (
|
||||||
"debug_discard",
|
"debug_discard",
|
||||||
"enabled",
|
"enabled",
|
||||||
|
@ -170,11 +170,8 @@ class ValidConfiguration(object):
|
|||||||
:return: True if the given section name, item_name pair is valid, False
|
:return: True if the given section name, item_name pair is valid, False
|
||||||
otherwise.
|
otherwise.
|
||||||
"""
|
"""
|
||||||
valid_items = self._static_valid_sections.get(section_name, ())
|
|
||||||
if valid_items is None:
|
|
||||||
return True
|
|
||||||
return (
|
return (
|
||||||
item_name in valid_items or
|
item_name in self._static_valid_sections.get(section_name, ()) or
|
||||||
self._is_valid_item(section_name, item_name)
|
self._is_valid_item(section_name, item_name)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user