From acb8b51e00e5226921aed568b3d9c047cc818050 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 24 Jun 2013 17:00:35 -0400 Subject: [PATCH] sock.sendall errors need-not go to stderr --- src/class_receiveDataThread.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index 46dfeeae..0c12f8f6 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -243,7 +243,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() def recverack(self): @@ -334,7 +334,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() # We have received a broadcast message @@ -1513,7 +1513,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() # We have received a getdata request from our peer @@ -1583,7 +1583,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() # Send an inv message with just one hash to all of our peers @@ -1942,7 +1942,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() # We have received a version message @@ -2021,7 +2021,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() # Sends a verack message @@ -2035,7 +2035,7 @@ class receiveDataThread(threading.Thread): except Exception as err: # if not 'Bad file descriptor' in err: shared.printLock.acquire() - sys.stderr.write('sock.sendall error: %s\n' % err) + print 'sock.sendall error:', err shared.printLock.release() # cf # 83