MCPcopy Create free account
hub / github.com/debpalash/VoiceStudio / write

Method write

backend/utils/hf_progress.py:126–134  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

124 self.fp = fp
125 self._is_safe_wrapper = True
126 def write(self, s):
127 try:
128 self.fp.write(s)
129 except (OSError, UnicodeError):
130 # OSError: EPIPE from a dead parent shell (the wrapper's original
131 # job). UnicodeError (#1155): a library print of user text hitting
132 # a non-UTF-8 stream — cp1252 stdout on Windows — must not abort
133 # the operation that printed. Logs are best-effort; work is not.
134 pass
135 def flush(self):
136 try:
137 getattr(self.fp, 'flush', lambda: None)()

Calls 1

writeMethod · 0.65