[elbe-devel] [PATCH] python3: Fix get_archive file mode
Torben Hohn
torben.hohn at linutronix.de
Wed Mar 10 12:29:30 CET 2021
On Mon, Mar 08, 2021 at 11:44:03AM +0100, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
>
> elbe get_archive fails because bytes are tried to be written to a str file
> object. Fix that by opening the file in binary mode.
>
> Signed-off-by: Bastian Germann <bage at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/commands/get_archive.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/elbepack/commands/get_archive.py b/elbepack/commands/get_archive.py
> index 7dd86ee78..438bb8c29 100644
> --- a/elbepack/commands/get_archive.py
> +++ b/elbepack/commands/get_archive.py
> @@ -14,7 +14,7 @@ from elbepack.treeutils import etree
>
>
> def unbase(s, fname):
> - outfile = open(fname, "w")
> + outfile = open(fname, "w+b")
> outfile.write(standard_b64decode(s))
> outfile.close()
>
> --
> 2.30.1
>
> _______________________________________________
> 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