Replace base64.encodestring with encodebytes
Base64.encodestring has been deprecated since 3.1 and removed
in python 3.9,Replace it with base64.encodebytes from python3.1[1].
[1]https://docs.python.org/3.9/library/base64.html?highlight=deprecated#base64.encodebytes
@@ -86,7 +86,7 @@ class DPLCommand(object):
'Accept': 'application/cdmi-container',
'x-cdmi-specification-version': '1.0.2'}
# base64 encode the username and password
- auth = base64.encodestring('%s:%s'
+ auth = base64.encodebytes('%s:%s'
% (self.username,
self.password)).replace('\n', '')
header['Authorization'] = 'Basic %s' % auth
