Commit 820cf465 authored by Sander van Veen's avatar Sander van Veen

Added missing self keywords.

parent 98e0871b
...@@ -14,7 +14,7 @@ class Client: ...@@ -14,7 +14,7 @@ class Client:
def send(self, msg): def send(self, msg):
totalsent = 0 totalsent = 0
while totalsent < MSGLEN: while totalsent < self.MSGLEN:
sent = self.sock.send(msg[totalsent:]) sent = self.sock.send(msg[totalsent:])
if not sent: if not sent:
raise RuntimeError("socket connection broken") raise RuntimeError("socket connection broken")
...@@ -22,8 +22,8 @@ class Client: ...@@ -22,8 +22,8 @@ class Client:
def receive(self): def receive(self):
msg = '' msg = ''
while len(msg) < MSGLEN: while len(msg) < self.MSGLEN:
chunk = self.sock.recv(MSGLEN-len(msg)) chunk = self.sock.recv(self.MSGLEN-len(msg))
if not chunk: if not chunk:
raise RuntimeError("socket connection broken") raise RuntimeError("socket connection broken")
msg = msg + chunk msg = msg + chunk
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment