Merge "Switch from base64 encodestring to encodebytes"

This commit is contained in:
Zuul 2020-12-15 03:25:36 +00:00 committed by Gerrit Code Review
commit 99d21fa8e5
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ class ZFSSAShareDriver(driver.ShareDriver):
self.zfssa = factory_zfssa()
self.zfssa.set_host(lcfg.zfssa_host, timeout=lcfg.zfssa_rest_timeout)
creds = '%s:%s' % (lcfg.zfssa_auth_user, lcfg.zfssa_auth_password)
auth_str = base64.encodestring(six.b(creds))[:-1]
auth_str = base64.encodebytes(six.b(creds))[:-1]
self.zfssa.login(auth_str)
if lcfg.zfssa_nas_mountpoint == '':
self.mountpoint += lcfg.zfssa_project