MCPcopy Index your code
hub / github.com/kubernetes-client/python / returncode

Method returncode

kubernetes/base/stream/ws_client.py:273–288  ·  view source on GitHub ↗

The return code, A None value indicates that the process hasn't terminated yet.

(self)

Source from the content-addressed store, hash-verified

271 self.update(timeout=None)
272 @property
273 def returncode(self):
274 """
275 The return code, A None value indicates that the process hasn't
276 terminated yet.
277 """
278 if self.is_open():
279 return None
280 else:
281 if self._returncode is None:
282 err = self.read_channel(ERROR_CHANNEL)
283 err = yaml.safe_load(err)
284 if err['status'] == "Success":
285 self._returncode = 0
286 else:
287 self._returncode = int(err['details']['causes'][0]['message'])
288 return self._returncode
289
290 def close(self, **kwargs):
291 """

Callers

nothing calls this directly

Calls 2

is_openMethod · 0.95
read_channelMethod · 0.95

Tested by

no test coverage detected