MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / write

Method write

pager_lib/smb/SMBConnection.py:67–75  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

65 self.auth_result = False
66
67 def write(self, data):
68 assert self.sock
69 data_len = len(data)
70 total_sent = 0
71 while total_sent < data_len:
72 sent = self.sock.send(data[total_sent:])
73 if sent == 0:
74 raise NotConnectedError('Server disconnected')
75 total_sent = total_sent + sent
76
77 #
78 # Support for "with" context

Callers

nothing calls this directly

Calls 2

NotConnectedErrorClass · 0.70
sendMethod · 0.45

Tested by

no test coverage detected