checking in changes. The test suite requires consistent use of spaces
and tabs.)
def send(self, data):
"""Send data to remote."""
- bytes = len(data)
- while bytes > 0:
- sent = self.sock.send(data)
- if sent == bytes:
- break # avoid copy
- data = data[sent:]
- bytes = bytes - sent
+ bytes = len(data)
+ while bytes > 0:
+ sent = self.sock.send(data)
+ if sent == bytes:
+ break # avoid copy
+ data = data[sent:]
+ bytes = bytes - sent
def shutdown(self):