diff options
author | Lukáš Ondráček <lukas.ondracek@nic.cz> | 2025-01-02 14:38:53 +0100 |
---|---|---|
committer | Lukáš Ondráček <lukas.ondracek@nic.cz> | 2025-01-02 14:38:53 +0100 |
commit | a01dbeba1852a6cd71e81fb99f65e0810ec0046f (patch) | |
tree | 2347fb0d57801f13279af9f4c1435def5af50990 /python/knot_resolver/client/commands/convert.py | |
parent | daemon/defer: fix configuration reload (diff) | |
parent | Merge branch 'kresctl-tab-completion' into 'master' (diff) | |
download | knot-resolver-a01dbeba1852a6cd71e81fb99f65e0810ec0046f.tar.xz knot-resolver-a01dbeba1852a6cd71e81fb99f65e0810ec0046f.zip |
Merge branch 'master' into defer-wip
Diffstat (limited to 'python/knot_resolver/client/commands/convert.py')
-rw-r--r-- | python/knot_resolver/client/commands/convert.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/python/knot_resolver/client/commands/convert.py b/python/knot_resolver/client/commands/convert.py index 412ed334..aab07519 100644 --- a/python/knot_resolver/client/commands/convert.py +++ b/python/knot_resolver/client/commands/convert.py @@ -3,7 +3,7 @@ import sys from pathlib import Path from typing import List, Optional, Tuple, Type -from knot_resolver.client.command import Command, CommandArgs, CompWords, register_command +from knot_resolver.client.command import Command, CommandArgs, CompWords, comp_get_words, register_command from knot_resolver.datamodel import KresConfig from knot_resolver.datamodel.globals import Context, reset_global_validation_context, set_global_validation_context from knot_resolver.utils.modeling import try_to_parse @@ -39,7 +39,6 @@ class ConvertCommand(Command): type=str, help="File with configuration in YAML or JSON format.", ) - convert.add_argument( "output_file", type=str, @@ -47,12 +46,11 @@ class ConvertCommand(Command): help="Optional, output file for converted configuration in Lua script. If not specified, converted configuration is printed.", default=None, ) - return convert, ConvertCommand @staticmethod def completion(args: List[str], parser: argparse.ArgumentParser) -> CompWords: - return {} + return comp_get_words(args, parser) def run(self, args: CommandArgs) -> None: with open(self.input_file, "r") as f: |