equal
deleted
inserted
replaced
759 self._writedata(data) |
759 self._writedata(data) |
760 |
760 |
761 def write(self, res, data): |
761 def write(self, res, data): |
762 if not self.writes: |
762 if not self.writes: |
763 return |
763 return |
|
764 |
|
765 # Python 2 returns None from some write() calls. Python 3 (reasonably) |
|
766 # returns the integer bytes written. |
|
767 if res is None and data: |
|
768 res = len(data) |
764 |
769 |
765 self.fh.write('%s> write(%d) -> %r' % (self.name, len(data), res)) |
770 self.fh.write('%s> write(%d) -> %r' % (self.name, len(data), res)) |
766 self._writedata(data) |
771 self._writedata(data) |
767 |
772 |
768 def flush(self, res): |
773 def flush(self, res): |