equal
deleted
inserted
replaced
91 self.encoding = encodename |
91 self.encoding = encodename |
92 self._encodefn = encodefn |
92 self._encodefn = encodefn |
93 |
93 |
94 def write(self, data, **opts): |
94 def write(self, data, **opts): |
95 opts = pycompat.byteskwargs(opts) |
95 opts = pycompat.byteskwargs(opts) |
96 opts[b'data'] = data |
96 if data is not None: |
|
97 opts[b'data'] = data |
97 self._cout.write(self._encodefn(opts)) |
98 self._cout.write(self._encodefn(opts)) |
98 |
99 |
99 def __getattr__(self, attr): |
100 def __getattr__(self, attr): |
100 return getattr(self._cout, attr) |
101 return getattr(self._cout, attr) |
101 |
102 |