eric6/Cooperation/Connection.py

changeset 8230
8b5c6896655b
parent 8222
5994b80b8760
diff -r 6fa22aa4fc4a -r 8b5c6896655b eric6/Cooperation/Connection.py
--- a/eric6/Cooperation/Connection.py	Mon Apr 12 19:25:18 2021 +0200
+++ b/eric6/Cooperation/Connection.py	Mon Apr 12 19:54:29 2021 +0200
@@ -425,10 +425,8 @@
         @param participants list of participants (list of strings of
             "host:port")
         """
-        if participants:
-            message = SeparatorToken.join(participants)
-        else:
-            message = "<empty>"
+        message = (SeparatorToken.join(participants) if participants
+                   else "<empty>")
         msg = QByteArray(message.encode("utf-8"))
         data = QByteArray("{0}{1}{2}{1}".format(
             Connection.ProtocolParticipants, SeparatorToken, msg.size())

eric ide

mercurial