From 1064582ac4ff6286ab39489edbbea484bb13b0c3 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Mon, 15 Sep 2014 14:03:52 +0200 Subject: [PATCH] remove useless test --- src/common/connection_handlers.py | 2 -- src/common/protocol/bytestream.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index d4108633cd..8b98627584 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1234,8 +1234,6 @@ class ConnectionHandlersBase: if obj.mtype == 'error': if not obj.msgtxt: obj.msgtxt = _('message') - if not obj.msgtxt: - return True self.dispatch_error_message(obj.stanza, obj.msgtxt, obj.session, obj.fjid, obj.timestamp) return True diff --git a/src/common/protocol/bytestream.py b/src/common/protocol/bytestream.py index 0c6d60adc1..73413cbf5c 100644 --- a/src/common/protocol/bytestream.py +++ b/src/common/protocol/bytestream.py @@ -393,7 +393,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream): my_ips = [self.peerhost[0]] # The ip we're connected to server with # all IPs from local DNS for addr in socket.getaddrinfo(socket.gethostname(), None): - if not addr[4][0] in my_ips and not addr[4][0].startswith('127'): + if not addr[4][0] in my_ips and not addr[4][0].startswith('127') and not addr[4][0] == '::1': my_ips.append(addr[4][0]) sender = file_props.sender -- GitLab