Switch from base64 encodestring to encodebytes
encodestring is deprecated since python 3.1 and removed in python 3.9. https: //docs.python.org/3.8/library/base64.html Closes-Bug: #1907494 Change-Id: I56d7622207165b6d875559597c62c31a637b3f26
This commit is contained in:
parent
d8dab2d077
commit
8bef5e25b7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user