diff --git a/esxport/click_opt/click_custom.py b/esxport/click_opt/click_custom.py index 3bfe360..f0fad84 100644 --- a/esxport/click_opt/click_custom.py +++ b/esxport/click_opt/click_custom.py @@ -53,7 +53,6 @@ def convert(self: Self, value: Any, param: Parameter | None, ctx: Context | None """Convert input to json.""" try: return json.loads(value) # type: ignore[no-any-return] - except json.JSONDecodeError as exc: self.fail(invalid_query_format.format(value=value, exc=exc), param, ctx) diff --git a/test/click/cli_test.py b/test/click/cli_test.py index 7cfb0da..eafbf79 100644 --- a/test/click/cli_test.py +++ b/test/click/cli_test.py @@ -56,7 +56,7 @@ def test_mandatory(self: Self, cli_runner: CliRunner, esxport_obj_with_data: EsX result = cli_runner.invoke( cli, ["-q", args["q"], "-o", args["o"], "-i", args["i"]], - input="password\n", + input=random_pass, catch_exceptions=False, ) assert result.exit_code == 0