From 78691ce7e6c47bb6e73bca965b213a0fa5099630 Mon Sep 17 00:00:00 2001 From: Multazim Deshmukh Date: Tue, 20 Jun 2023 16:03:32 +0530 Subject: [PATCH] use pure-sasl --- pyhive/hive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyhive/hive.py b/pyhive/hive.py index e70c7294..c1287488 100644 --- a/pyhive/hive.py +++ b/pyhive/hive.py @@ -60,7 +60,7 @@ def get_sasl_client(host, sasl_auth, service=None, username=None, password=None) sasl_client.setAttr('username', username) sasl_client.setAttr('password', password) else: - raise AssertionError + raise ValueError("sasl_auth only supports GSSAPI and PLAIN") sasl_client.init() return sasl_client @@ -74,7 +74,7 @@ def get_pure_sasl_client(host, sasl_auth, service=None, username=None, password= elif sasl_auth == 'PLAIN': sasl_kwargs = {'username': username, 'password': password} else: - raise AssertionError + raise ValueError("sasl_auth only supports GSSAPI and PLAIN") return PureSASLClient(host=host, **sasl_kwargs)