mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
working archivebox update CLI cmd
This commit is contained in:
parent
a0edf218e8
commit
c9a05c9d94
7 changed files with 61 additions and 114 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue