Fix py39 compatibility
In python 3.9 base64.encodestring() and base64.decodestring(), aliases deprecated since Python 3.1, are removed. base64.encodebytes() and base64.decodebytes() should be used instead: https://docs.python.org/3/whatsnew/3.9.html Change-Id: I7ac7133ff4e9f118dac3dbc179dfc89c932705bb
This commit is contained in:
parent
55a24e730d
commit
365ccb0471
@ -48,7 +48,7 @@ def collect():
|
||||
log = logging.getLogger()
|
||||
conn = http_client.HTTPConnection(OS_QA_RABBITMQ_API)
|
||||
auth = '%s:%s' % (OS_QA_RABBITMQ_API_USER, OS_QA_RABBITMQ_API_PASS)
|
||||
auth = base64.encodestring(auth.encode('utf-8')).decode('ascii')
|
||||
auth = base64.encodebytes(auth.encode('utf-8')).decode('ascii')
|
||||
auth = auth.replace('\n', '')
|
||||
auth = {'Authorization': 'Basic %s' % auth}
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user