@@ -110,7 +110,7 @@ def __init__(self, display = None):
110110 self .request_serial = 1
111111 self .request_queue = []
112112
113- # Send-and-recieve loop, see function send_and_recive
113+ # Send-and-receive loop, see function send_and_receive
114114 # for a detailed explanation
115115 self .send_recv_lock = lock .allocate_lock ()
116116 self .send_active = 0
@@ -127,7 +127,7 @@ def __init__(self, display = None):
127127 buffer_size = math .pow (2 , math .floor (math .log (buffer_size , 2 )))
128128 self .recv_buffer_size = int (buffer_size )
129129
130- # Data used by the send-and-recieve loop
130+ # Data used by the send-and-receive loop
131131 self .sent_requests = []
132132 self .recv_packet_len = 0
133133 self .data_send = b''
@@ -146,7 +146,7 @@ def __init__(self, display = None):
146146 # Right, now we're all set up for the connection setup
147147 # request with the server.
148148
149- # Figure out which endianess the hardware uses
149+ # Figure out which endianness the hardware uses
150150 self .big_endian = struct .unpack ('BB' , struct .pack ('H' , 0x0100 ))[0 ]
151151
152152 if self .big_endian :
@@ -204,7 +204,7 @@ def next_event(self):
204204
205205 while not self .event_queue :
206206
207- # Lock send_recv so no send_and_recieve
207+ # Lock send_recv so no send_and_receive
208208 # can start or stop while we're checking
209209 # whether there are one active.
210210 self .send_recv_lock .acquire ()
@@ -400,7 +400,7 @@ def send_and_recv(self, flush = None, event = None, request = None, recv = None)
400400 be true. Will return immediately if another thread is
401401 already doing send_and_recv.
402402
403- To wait for an event to be recieved , event should be true.
403+ To wait for an event to be received , event should be true.
404404
405405 To wait for a response to a certain request (either an error
406406 or a response), request should be set the that request's
@@ -561,7 +561,7 @@ def send_and_recv(self, flush = None, event = None, request = None, recv = None)
561561
562562 rs , ws , es = select .select ([self .socket ], writeset , [], timeout )
563563
564- # Ignore errors caused by a signal recieved while blocking.
564+ # Ignore errors caused by a signal received while blocking.
565565 # All other errors are re-raised.
566566 except select .error as err :
567567 if isinstance (err , OSError ):
@@ -627,7 +627,7 @@ def send_and_recv(self, flush = None, event = None, request = None, recv = None)
627627
628628 # There are three different end of send-recv-loop conditions.
629629 # However, we don't leave the loop immediately, instead we
630- # try to send and recieve any data that might be left. We
630+ # try to send and receive any data that might be left. We
631631 # do this by giving a timeout of 0 to select to poll
632632 # the socket.
633633
@@ -643,7 +643,7 @@ def send_and_recv(self, flush = None, event = None, request = None, recv = None)
643643 if request is not None and gotreq :
644644 break
645645
646- # Always break if we just want to recieve as much as possible
646+ # Always break if we just want to receive as much as possible
647647 if recv :
648648 break
649649
@@ -678,9 +678,9 @@ def send_and_recv(self, flush = None, event = None, request = None, recv = None)
678678 def parse_response (self , request ):
679679 """Internal method.
680680
681- Parse data recieved from server. If REQUEST is not None
681+ Parse data received from server. If REQUEST is not None
682682 true is returned if the request with that serial number
683- was recieved , otherwise false is returned.
683+ was received , otherwise false is returned.
684684
685685 If REQUEST is -1, we're parsing the server connection setup
686686 response.
@@ -711,11 +711,11 @@ def parse_response(self, request):
711711 raise AssertionError (rtype )
712712
713713 # Every response is at least 32 bytes long, so don't bother
714- # until we have recieved that much
714+ # until we have received that much
715715 if len (self .data_recv ) < 32 :
716716 return gotreq
717717
718- # Error resposne
718+ # Error response
719719 if rtype == 0 :
720720 gotreq = self .parse_error_response (request ) or gotreq
721721
0 commit comments