From 76d27bc43d56d7ef3ca0090fb199777888adf7c3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Sep 2021 06:17:09 +0200 Subject: Adding upstream version 3.2.0. Signed-off-by: Daniel Baumann --- pgcli/packages/prompt_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pgcli/packages/prompt_utils.py') diff --git a/pgcli/packages/prompt_utils.py b/pgcli/packages/prompt_utils.py index 3c58490..e8589de 100644 --- a/pgcli/packages/prompt_utils.py +++ b/pgcli/packages/prompt_utils.py @@ -3,7 +3,7 @@ import click from .parseutils import is_destructive -def confirm_destructive_query(queries): +def confirm_destructive_query(queries, warning_level): """Check if the query is destructive and prompts the user to confirm. Returns: @@ -15,7 +15,7 @@ def confirm_destructive_query(queries): prompt_text = ( "You're about to run a destructive command.\n" "Do you want to proceed? (y/n)" ) - if is_destructive(queries) and sys.stdin.isatty(): + if is_destructive(queries, warning_level) and sys.stdin.isatty(): return prompt(prompt_text, type=bool) -- cgit v1.2.3