[CRIU] [PATCH 1/3] p.haul: fix bug in fileobj_wrap.write
Nikita Spiridonov
nspiridonov at virtuozzo.com
Fri Mar 18 08:12:36 PDT 2016
Send all data passed to fileobj_wrap.write (since it seems that
processing of partial sends is missing in tarfile) and return number
of sended bytes as function result (just in case).
Signed-off-by: Nikita Spiridonov <nspiridonov at virtuozzo.com>
---
phaul/util.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/phaul/util.py b/phaul/util.py
index ee4cb26..20954ea 100644
--- a/phaul/util.py
+++ b/phaul/util.py
@@ -20,8 +20,9 @@ class fileobj_wrap:
def read(self, size=0x10000):
return self.__sk.recv(size)
- def write(self, str):
- self.__sk.send(str)
+ def write(self, data):
+ self.__sk.sendall(data)
+ return len(data)
def discard_sk_input(sk):
--
1.7.1
More information about the CRIU
mailing list