summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/knot_resolver/client/commands/completion.py2
-rw-r--r--python/knot_resolver/client/commands/debug.py2
-rw-r--r--python/knot_resolver/client/main.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/python/knot_resolver/client/commands/completion.py b/python/knot_resolver/client/commands/completion.py
index f3101c19..75f8e1eb 100644
--- a/python/knot_resolver/client/commands/completion.py
+++ b/python/knot_resolver/client/commands/completion.py
@@ -22,6 +22,8 @@ class CompletionCommand(Command):
super().__init__(namespace)
self.shell: Shells = namespace.shell
self.args: List[str] = namespace.args
+ if namespace.extra is not None:
+ self.args.append("--")
@staticmethod
def register_args_subparser(
diff --git a/python/knot_resolver/client/commands/debug.py b/python/knot_resolver/client/commands/debug.py
index 00853c03..71ce673e 100644
--- a/python/knot_resolver/client/commands/debug.py
+++ b/python/knot_resolver/client/commands/debug.py
@@ -19,7 +19,7 @@ class DebugCommand(Command):
self.sudo: bool = namespace.sudo
self.gdb: str = namespace.gdb
self.print_only: bool = namespace.print_only
- self.gdb_args: List[str] = namespace.extra
+ self.gdb_args: List[str] = namespace.extra if namespace.extra is not None else []
super().__init__(namespace)
@staticmethod
diff --git a/python/knot_resolver/client/main.py b/python/knot_resolver/client/main.py
index 461b7fc4..683bc95b 100644
--- a/python/knot_resolver/client/main.py
+++ b/python/knot_resolver/client/main.py
@@ -77,7 +77,7 @@ def main() -> None:
argv_extra = sys.argv[(pa_index + 1) :]
except ValueError:
argv_to_parse = sys.argv[1:]
- argv_extra = []
+ argv_extra = None
namespace = parser.parse_args(argv_to_parse)
if hasattr(namespace, "extra"):