Commit de952a80 authored by Jim Fulton's avatar Jim Fulton

Got rid of some debugging code that didn't actually do anything.

Cleaned up trailing whitespace.
parent 6e1be99a
......@@ -75,12 +75,8 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
socket = None # to outwit Sam's getattr
def __init__(self, sock, addr, map=None, debug=None):
def __init__(self, sock, addr, map=None):
self.addr = addr
if debug is not None:
self._debug = debug
elif not hasattr(self, '_debug'):
self._debug = __debug__
# __input_lock protects __inp, __input_len, __state, __msg_size
self.__input_lock = threading.Lock()
self.__inp = None # None, a single String, or a list
......@@ -150,7 +146,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
yield ''
self.message_output(hack())
def get_addr(self):
return self.addr
......@@ -309,7 +305,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
if err[0] in expected_socket_write_errors:
break # we couldn't write anything
raise
if n < l:
output.insert(0, v[n:])
break # we can't write any more
......@@ -325,7 +321,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
def __message_output(self, message, output):
# do two separate appends to avoid copying the message string
size = 4
size = 4
if self.__hmac_send:
output.append(struct.pack(">I", len(message) | MAC_BIT))
self.__hmac_send.update(message)
......
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