working archivebox update CLI cmd

This commit is contained in:
Nick Sweeting 2024-11-19 02:31:59 -08:00
parent a0edf218e8
commit c9a05c9d94
No known key found for this signature in database
7 changed files with 61 additions and 114 deletions

View file

@ -23,7 +23,7 @@ def get_real_name(key: str) -> str:
for section in CONFIGS.values():
try:
return section.aliases[key]
except KeyError:
except (KeyError, AttributeError):
pass
return key
@ -159,6 +159,9 @@ def write_config_file(config: Dict[str, str]) -> benedict:
section = section_for_key(key)
assert section is not None
if not hasattr(section, 'toml_section_header'):
raise ValueError(f'{key} is read-only (defined in {type(section).__module__}.{type(section).__name__}). Refusing to set.')
section_name = section.toml_section_header
if section_name in config_file: