MCPcopy Create free account
hub / github.com/ActiveState/code / __call__

Method __call__

recipes/Python/578488_Threaded/recipe-578488.py:100–112  ·  view source on GitHub ↗
(self, requestId, command)

Source from the content-addressed store, hash-verified

98 self._stream = stream
99
100 def __call__(self, requestId, command):
101 frame = self._compile(requestId, command)
102 if frame is not None:
103 try:
104 self._stream.write(frame)
105 self._stream.flush()
106 except:
107 command = self.SENTINEL
108 if command == self.SENTINEL:
109 try:
110 self._stream.close()
111 finally:
112 raise StopIteration()
113
114 def _compile(self, requestId, command):
115 raise NotImplementedError()

Callers

nothing calls this directly

Calls 4

_compileMethod · 0.95
writeMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected