Cooperation/CooperationClient.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3190
a9a94491c4fd
child 3591
2f2a4a76dd22
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
83 83
84 if found: 84 if found:
85 break 85 break
86 86
87 if self.__username == "": 87 if self.__username == "":
88 self.__username = self.trUtf8("unknown") 88 self.__username = self.tr("unknown")
89 89
90 self.__listening = False 90 self.__listening = False
91 self.__serversErrorString = "" 91 self.__serversErrorString = ""
92 92
93 def chatWidget(self): 93 def chatWidget(self):
291 for participant in participants: 291 for participant in participants:
292 host, port = participant.split("@") 292 host, port = participant.split("@")
293 port = int(port) 293 port = int(port)
294 294
295 if port == 0: 295 if port == 0:
296 msg = self.trUtf8("Illegal address: {0}@{1}\n").format( 296 msg = self.tr("Illegal address: {0}@{1}\n").format(
297 host, port) 297 host, port)
298 self.connectionError.emit(msg) 298 self.connectionError.emit(msg)
299 else: 299 else:
300 if not self.hasConnection(QHostAddress(host), port): 300 if not self.hasConnection(QHostAddress(host), port):
301 connection = Connection(self) 301 connection = Connection(self)
384 self.__serversErrorString = server.errorString() 384 self.__serversErrorString = server.errorString()
385 else: 385 else:
386 self.__serversErrorString = self.__servers[0].errorString() 386 self.__serversErrorString = self.__servers[0].errorString()
387 else: 387 else:
388 res = False 388 res = False
389 self.__serversErrorString = self.trUtf8("No servers present.") 389 self.__serversErrorString = self.tr("No servers present.")
390 390
391 if res: 391 if res:
392 self.__serversErrorString = "" 392 self.__serversErrorString = ""
393 self.__listening = res 393 self.__listening = res
394 return res, port 394 return res, port

eric ide

mercurial