cw 3.22: Binary is now a BytesIO

authorSamuel Trégouët <samuel.tregouet@logilab.fr>
changeset38e9e8622c21
branchdefault
phasedraft
hiddenyes
parent revision#baeba4fdee19 [entities] easy access of stderr and stdout content via properties
child revision<not specified>
files modified by this revision
entities.py
# HG changeset patch
# User Samuel Trégouët <samuel.tregouet@logilab.fr>
# Date 1454665013 -3600
# Fri Feb 05 10:36:53 2016 +0100
# Node ID 38e9e8622c21a2d7f918573626158aba3a893344
# Parent baeba4fdee193e2086b400dbb2287c3e783f460e
cw 3.22: Binary is now a BytesIO

diff --git a/entities.py b/entities.py
@@ -93,10 +93,11 @@
1          for outname, content in communicate(proc):
2              self.debug('Appending %s bytes to %s (stream %s)',
3                         len(content), outputs[outname].eid, outname)
4              outputs[outname].data.write(content)
5              outputs[outname].cw_set(data=outputs[outname].data)
6 +            outputs[outname].data.seek(0, 2)  # go to the end of stream
7              self._cw.commit(free_cnxset=False)
8 
9          return proc.wait()
10 
11      def _finalize(self, return_code, trname):