eric6/Cooperation/CooperationClient.py

changeset 7250
d8bdc55aee1a
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7249:0bf517e60f54 7250:d8bdc55aee1a
9 9
10 10
11 import collections 11 import collections
12 12
13 from PyQt5.QtCore import QObject, pyqtSignal, QProcess, QRegExp 13 from PyQt5.QtCore import QObject, pyqtSignal, QProcess, QRegExp
14 from PyQt5.QtNetwork import QHostInfo, QHostAddress, QAbstractSocket, \ 14 from PyQt5.QtNetwork import (
15 QNetworkInterface 15 QHostInfo, QHostAddress, QAbstractSocket, QNetworkInterface
16 )
16 17
17 from .CooperationServer import CooperationServer 18 from .CooperationServer import CooperationServer
18 from .Connection import Connection 19 from .Connection import Connection
19 20
20 import Preferences 21 import Preferences
159 Public method to remove a connection. 160 Public method to remove a connection.
160 161
161 @param connection reference to the connection to be removed 162 @param connection reference to the connection to be removed
162 (Connection) 163 (Connection)
163 """ 164 """
164 if connection.peerAddress() in self.__peers and \ 165 if (connection.peerAddress() in self.__peers and
165 connection in self.__peers[connection.peerAddress()]: 166 connection in self.__peers[connection.peerAddress()]):
166 self.__peers[connection.peerAddress()].remove(connection) 167 self.__peers[connection.peerAddress()].remove(connection)
167 nick = connection.name() 168 nick = connection.name()
168 if nick != "": 169 if nick != "":
169 self.participantLeft.emit(nick) 170 self.participantLeft.emit(nick)
170 171

eric ide

mercurial