def _write(self, msg): # Just like the original _write in the Generator class except # that we do not write the headers if self._headers is false. # if self._headers: Generator._write(self, msg) else: self._dispatch(msg)