Replace base64.encodestring with base64.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

Change-Id: I159bf1db5e74c5c5e604d4f11660c2a0be916ae0
This commit is contained in:
likui
2023-09-19 11:15:01 +08:00
parent 9f13a58e2b
commit e15d20f003

View File

@@ -302,7 +302,7 @@ class Memcached(object):
"""
try:
b64_value = base64.encodestring(value)
b64_value = base64.encodebytes(value)
except Exception as exp:
self._failure(
error=str(exp),