2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

Fix user/password login in python3

The forced bytes of the function was incompatible
with str oriented logic later
This commit is contained in:
Jarrod Johnson 2019-10-11 13:21:55 -04:00
parent 1dac61adca
commit d9f1d6c033

View File

@ -28,6 +28,7 @@ import hashlib
import hmac
import multiprocessing
import confluent.userutil as userutil
import confluent.util as util
pam = None
try:
import confluent.pam as pam
@ -133,6 +134,9 @@ def _get_usertenant(name, tenant=False):
else: # assume it is a non-tenant user account
user = name
tenant = None
user = util.stringify(user)
if tenant:
tenant = util.stringify(tenant)
yield user
yield tenant