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

Function run_action

Lib/test/test__interpchannels.py:192–210  ·  view source on GitHub ↗
(cid, action, end, state, *, hideclosed=True)

Source from the content-addressed store, hash-verified

190
191
192def run_action(cid, action, end, state, *, hideclosed=True):
193 if state.closed:
194 if action == 'use' and end == 'recv' and state.pending:
195 expectfail = False
196 else:
197 expectfail = True
198 else:
199 expectfail = False
200
201 try:
202 result = _run_action(cid, action, end, state)
203 except _channels.ChannelClosedError:
204 if not hideclosed and not expectfail:
205 raise
206 result = state.close()
207 else:
208 if expectfail:
209 raise ... # XXX
210 return result
211
212
213def _run_action(cid, action, end, state):

Callers 1

run_actionMethod · 0.85

Calls 2

_run_actionFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…