MCPcopy Index your code
hub / github.com/python/cpython / _feed_stdin

Method _feed_stdin

Lib/asyncio/subprocess.py:148–166  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

146 self._transport.kill()
147
148 async def _feed_stdin(self, input):
149 debug = self._loop.get_debug()
150 try:
151 if input is not None:
152 self.stdin.write(input)
153 if debug:
154 logger.debug(
155 '%r communicate: feed stdin (%s bytes)', self, len(input))
156
157 await self.stdin.drain()
158 except (BrokenPipeError, ConnectionResetError) as exc:
159 # communicate() ignores BrokenPipeError and ConnectionResetError.
160 # write() and drain() can raise these exceptions.
161 if debug:
162 logger.debug('%r communicate: stdin got %r', self, exc)
163
164 if debug:
165 logger.debug('%r communicate: close stdin', self)
166 self.stdin.close()
167
168 async def _noop(self):
169 return None

Callers 1

communicateMethod · 0.95

Calls 5

get_debugMethod · 0.45
writeMethod · 0.45
debugMethod · 0.45
drainMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected