[CRIU] [PATCH] crit: Fix ipc load/dump for io.BytesIO input/output

Cyrill Gorcunov gorcunov at gmail.com
Thu Dec 10 11:23:15 PST 2015


On Thu, Dec 10, 2015 at 10:08:17PM +0300, Pavel Emelyanov wrote:
> There are loads and dumps method in pycriu.images that work with
> strings, instead of open()-ed files. For simplicity strings are
> turned into streams with io.BytesIO and the files are then pushed
> into regular load/dump methods.
> 
> The problem is that array.array object doesn't work with io object
> in .fromfile/.tofile methods, so we have to read/write the data
> from them explicitly and use .fromstring/.tostring for arrays.
> 
> With this the crit test finally passes :D
> 
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>

Thank you!
Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>


More information about the CRIU mailing list