MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / send_over_socket

Method send_over_socket

python/web/src/socket_cmds_flask.py:47–70  ·  view source on GitHub ↗

Sends a payload over a given socket

(self, sock, payload)

Source from the content-addressed store, hash-verified

45 return None
46
47 def send_over_socket(self, sock, payload):
48 """Sends a payload over a given socket"""
49 try:
50 return super().send_over_socket(sock, payload)
51 except EmptySocketChunkException:
52 abort(
53 503,
54 _(
55 "The PiSCSI Web Interface lost connection to PiSCSI. "
56 "Please go back and try again. "
57 "If the issue persists, please report a bug."
58 ),
59 )
60 return None
61 except InvalidProtobufResponse:
62 abort(
63 500,
64 _(
65 "The PiSCSI Web Interface did not get a valid response from PiSCSI. "
66 "Please go back and try again. "
67 "If the issue persists, please report a bug."
68 ),
69 )
70 return None

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected