Skip to content

Commit

Permalink
use pure-sasl
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeshmu committed Jun 20, 2023
1 parent e38eb23 commit 78691ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyhive/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 78691ce

Please sign in to comment.