[elbe-devel] [PATCH 02/25] soapclient: open files in binary mode

Manuel Traut manuel.traut at linutronix.de
Fri Dec 8 16:21:02 CET 2017


On Tue, Dec 05, 2017 at 05:31:33PM +0100, Torben Hohn wrote:
> On Fri, Dec 01, 2017 at 04:50:59PM +0100, Manuel Traut wrote:
> > binascii.bs2a_base64 expects binary data
> > 
> > Signed-off-by: Manuel Traut <manut at linutronix.de>
> 
> Reviewed-by: Torben Hohn <torbenh at linutronix.de>

thanks for the review, applied to devel/elbe-3.0

> > ---
> >  elbepack/soapclient.py | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
> > index d5a15d7e..add70122 100644
> > --- a/elbepack/soapclient.py
> > +++ b/elbepack/soapclient.py
> > @@ -255,7 +255,7 @@ class SetXmlAction(ClientAction):
> >  
> >          size = 1024 * 1024
> >          part = 0
> > -        with file (filename, "r") as fp:
> > +        with file (filename, "rb") as fp:
> >              while (True):
> >                  xml_base64 = binascii.b2a_base64(fp.read (size))
> >                  # finish upload
> > @@ -670,7 +670,6 @@ class DownloadAction(RepoAction):
> >          client.download_file (builddir, filename, dst_fname)
> >          print("%s saved" % dst_fname)
> >  
> > -
> >  RepoAction.register(DownloadAction)
> >  
> >  
> > @@ -685,7 +684,7 @@ class UploadPackageAction(RepoAction):
> >          # Uploads file f into builddir in intivm
> >          size = 1024 * 1024
> >          part = 0
> > -        with file (f, "r") as fp:
> > +        with file (f, "rb") as fp:
> >              while (True):
> >                  xml_base64 = binascii.b2a_base64(fp.read (size))
> >                  # finish upload
> > -- 
> > 2.15.1
> > 
> > 
> > _______________________________________________
> > elbe-devel mailing list
> > elbe-devel at linutronix.de
> > https://lists.linutronix.de/mailman/listinfo/elbe-devel
> 
> -- 
> Mit freundlichen Grüßen
> Torben Hohn
> 
> Linutronix GmbH
> 
> Standort: Bremen
> 
> Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> 
> Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
> Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
> Nr. / Trade register no.: 700 806
> 
> Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner
> 
> Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
> benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
> möglich ist, durch Antwort-Mail. Vielen Dank!





More information about the elbe-devel mailing list