Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the code for printing bad data

  • Loading branch information...
commit 8ea4d4178e2ac0c13bc1fc3d2aa7d53454945488 1 parent e69ef33
Pierre Riteau priteau authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lantorrent/pylantorrent/ltConnection.py
8 lantorrent/pylantorrent/ltConnection.py
View
@@ -116,10 +116,10 @@ def send(self, data):
self.valid = False
self.ex = LTException(506, "%s:%s %s" % (self.host, str(self.port), str(ex)), self.host, self.port, self.requests)
pylantorrent.log(logging.WARNING, "send error " + str(self.ex), traceback)
- data = self._read_from_socket()
- while(data):
- pylantorrent.log(logging.WARNING, "bad data s" + str(data))
- data = self._read_from_socket()
+ data = self._read_from_socket(self.read_buffer_len)
+ while data:
+ pylantorrent.log(logging.WARNING, "bad data: " + str(data))
+ data = self._read_from_socket(self.read_buffer_len)
j = self.ex.get_json()
s = json.dumps(j)
self.output_printer.print_results(s)
Please sign in to comment.
Something went wrong with that request. Please try again.