[elbe-devel] [PATCH] archivedir: base64.encodebytes replaces encodestring
Torben Hohn
torben.hohn at linutronix.de
Wed Oct 28 12:47:39 CET 2020
On Thu, Oct 15, 2020 at 02:41:41PM +0200, bage at linutronix.de wrote:
> 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
lets remove the comment then.
with the comment removed,
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> - return encodestring(s)
> + return encodebytes(s)
>
> def collect(tararchive, path, keep):
> if keep:
> --
> 2.28.0
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list