Python 3.9: base64.encodestring is removed

We should use base64.encodebytes instead, which is avaiable since
Python 3.2.

Change-Id: Ic945aff08d00bf2e602964cb1e25ea045e645b17
This commit is contained in:
Thomas Goirand
2020-10-16 13:08:53 +02:00
parent 17958681f6
commit 2b6f6ac284

View File

@@ -420,7 +420,7 @@ def read_url_content(url):
try:
content.decode('utf-8')
except ValueError:
content = base64.encodestring(content)
content = base64.encodebytes(content)
return content