[elbe-devel] [PATCH] archivedir: base64.encodebytes replaces encodestring
bage at linutronix.de
bage at linutronix.de
Thu Oct 15 14:41:41 CEST 2020
From: Bastian Germann <bage at linutronix.de>
The base64.encodestring function is removed from Python 3.9.
Replace it with base64.encodebytes instead.
Signed-off-by: Bastian Germann <bage at linutronix.de>
---
elbepack/archivedir.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/archivedir.py b/elbepack/archivedir.py
index 4b9ace9a9..b06bf0b2a 100644
--- a/elbepack/archivedir.py
+++ b/elbepack/archivedir.py
@@ -14,7 +14,7 @@ try:
except ImportError:
from urlparse import urljoin,urlparse
-from base64 import encodestring, standard_b64decode
+from base64 import encodebytes, standard_b64decode
from subprocess import CalledProcessError
from tempfile import NamedTemporaryFile
@@ -33,7 +33,7 @@ def enbase(fname, compress=True):
s = bz2.compress(s)
# TODO:py3 - Use base64.encodebytes
# pylint: disable=deprecated-method
- return encodestring(s)
+ return encodebytes(s)
def collect(tararchive, path, keep):
if keep:
--
2.28.0
More information about the elbe-devel
mailing list