Skip to content

Commit 72c49a0

Browse files
Kaivan Kamalitrel
authored andcommitted
[#356] Per Python socket documentation getpeername() is not supported on some systems. Removing the call to getpeername(), as this was only added to assist in debugging
1 parent 0f5d968 commit 72c49a0

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

irods/message/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,9 @@ def _recv_message_in_len(sock, size):
160160
retbuf = None
161161

162162
# Get socket properties for debug and exception messages.
163-
host, port = sock.getpeername()
164163
is_blocking = _socket_is_blocking(sock)
165164
timeout = sock.gettimeout()
166165

167-
logger.debug('host: %s',host)
168-
logger.debug('port: %d',port)
169166
logger.debug('is_blocking: %s',is_blocking)
170167
logger.debug('timeout: %s',timeout)
171168

@@ -196,8 +193,7 @@ def _recv_message_in_len(sock, size):
196193
# than 'size', throw a socket.error exception
197194
if retbuf is None or len(retbuf) != size:
198195
retbuf_size = len(retbuf) if retbuf is not None else 0
199-
msg = 'Read {} bytes from the socket (host {}, port {}) instead of expected {} bytes'.format(
200-
retbuf_size, host, port, size)
196+
msg = 'Read {} bytes from socket instead of expected {} bytes'.format(retbuf_size, size)
201197
raise socket.error(msg)
202198

203199
return retbuf

0 commit comments

Comments
 (0)