[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Fixing trace truncation for received messages



commit 2d25cf9f103f9a876dcfee9d3e2b233a97f3e0c3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Aug 14 10:12:26 2017 -0700

    Fixing trace truncation for received messages
    
    Oops, missed that these were the lines themselves rather than the count.
---
 stem/socket.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/socket.py b/stem/socket.py
index 8c3e4205..d10b40d2 100644
--- a/stem/socket.py
+++ b/stem/socket.py
@@ -599,7 +599,7 @@ def recv_message(control_file):
       if TRUNCATE_LOGS and len(log_message_lines) > TRUNCATE_LOGS:
         log_message = '\n'.join(log_message_lines[:TRUNCATE_LOGS] + ['... %i more lines...' % (len(log_message_lines) - TRUNCATE_LOGS)])
 
-      if log_message_lines > 2:
+      if len(log_message_lines) > 2:
         log.trace('Received from tor:\n%s' % log_message)
       else:
         log.trace('Received from tor: %s' % log_message.replace('\n', '\\n'))

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits