Merge "Replace base64.encodestring with encodebytes"

This commit is contained in:
Zuul 2022-09-16 18:46:35 +00:00 committed by Gerrit Code Review
commit 9344c19fd4
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ 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'
% (self.username,
auth = base64.encodebytes('%s:%s'
% (self.username,
self.password)).replace('\n', '')
header['Authorization'] = 'Basic %s' % auth