From 224962aa83fd509798fe9295fec252352e7647e8 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 4 Dec 2023 17:32:20 -0500 Subject: [PATCH] Fix dbshell's client_session_keep_alive and passcode_in_password options --- CHANGELOG.md | 3 +++ django_snowflake/client.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd8e71..3704fe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ dictionary of the `DATABASES` setting instead of `'private_key'`. This is now the documented pattern in the README. +* Fixed `dbshell` crash if using the `client_session_keep_alive` or + `passcode_in_password` options. + ## 4.2 beta 1 - 2023-04-11 * Added support for `JSONField`. diff --git a/django_snowflake/client.py b/django_snowflake/client.py index 19a42ba..0d0ab0b 100644 --- a/django_snowflake/client.py +++ b/django_snowflake/client.py @@ -34,7 +34,7 @@ def settings_to_cmd_args_env(cls, settings_dict, parameters): if authenticator: args += ['--authenticator', authenticator] if client_session_keep_alive: - args += ['--client-session-keep-alive', client_session_keep_alive] + args += ['--client-session-keep-alive'] if dbname: args += ['-d', dbname] if host: @@ -42,7 +42,7 @@ def settings_to_cmd_args_env(cls, settings_dict, parameters): if passcode: args += ['--mfa-passcode', passcode] if passcode_in_password: - args += ['--mfa-passcode-in-password', passcode_in_password] + args += ['--mfa-passcode-in-password'] if private_key_file: args += ['--private-key-path', private_key_file] if role: