comparison mercurial/httpclient/__init__.py @ 17428:72803c8edaa4

avoid using abbreviations that look like spelling errors
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 27 Aug 2012 23:14:27 +0200
parents e7cfe3587ea4
children 31f32a96e1e3
comparison
equal deleted inserted replaced
17427:57c6c24b9bc4 17428:72803c8edaa4
168 try: 168 try:
169 data = self.sock.recv(INCOMING_BUFFER_SIZE) 169 data = self.sock.recv(INCOMING_BUFFER_SIZE)
170 except socket.sslerror, e: 170 except socket.sslerror, e:
171 if e.args[0] != socket.SSL_ERROR_WANT_READ: 171 if e.args[0] != socket.SSL_ERROR_WANT_READ:
172 raise 172 raise
173 logger.debug('SSL_WANT_READ in _select, should retry later') 173 logger.debug('SSL_ERROR_WANT_READ in _select, should retry later')
174 return True 174 return True
175 logger.debug('response read %d data during _select', len(data)) 175 logger.debug('response read %d data during _select', len(data))
176 # If the socket was readable and no data was read, that means 176 # If the socket was readable and no data was read, that means
177 # the socket was closed. Inform the reader (if any) so it can 177 # the socket was closed. Inform the reader (if any) so it can
178 # raise an exception if this is an invalid situation. 178 # raise an exception if this is an invalid situation.
530 data = r[0].recv(INCOMING_BUFFER_SIZE) 530 data = r[0].recv(INCOMING_BUFFER_SIZE)
531 except socket.sslerror, e: 531 except socket.sslerror, e:
532 if e.args[0] != socket.SSL_ERROR_WANT_READ: 532 if e.args[0] != socket.SSL_ERROR_WANT_READ:
533 raise 533 raise
534 logger.debug( 534 logger.debug(
535 'SSL_WANT_READ while sending data, retrying...') 535 'SSL_ERROR_WANT_READ while sending data, retrying...')
536 continue 536 continue
537 if not data: 537 if not data:
538 logger.info('socket appears closed in read') 538 logger.info('socket appears closed in read')
539 self.sock = None 539 self.sock = None
540 self._current_response = None 540 self._current_response = None