eric6/Cooperation/Connection.py

changeset 7250
d8bdc55aee1a
parent 7229
53054eb5b15a
child 7360
9190402e4505
diff -r 0bf517e60f54 -r d8bdc55aee1a eric6/Cooperation/Connection.py
--- a/eric6/Cooperation/Connection.py	Thu Sep 19 19:39:04 2019 +0200
+++ b/eric6/Cooperation/Connection.py	Sat Sep 21 13:03:17 2019 +0200
@@ -178,8 +178,8 @@
                 return
             
             try:
-                user, serverPort = \
-                    str(self.__buffer, encoding="utf-8").split(":")
+                user, serverPort = (
+                    str(self.__buffer, encoding="utf-8").split(":"))
             except ValueError:
                 self.abort()
                 return
@@ -211,8 +211,8 @@
                 self.abort()
                 return
             
-            if self.__serverPort != self.peerPort() and \
-               not Preferences.getCooperation("AutoAcceptConnections"):
+            if (self.__serverPort != self.peerPort() and
+                    not Preferences.getCooperation("AutoAcceptConnections")):
                 # don't ask for reverse connections or
                 # if we shall accept automatically
                 res = E5MessageBox.yesNo(
@@ -300,9 +300,9 @@
         
         @return data length (integer)
         """
-        if self.bytesAvailable() <= 0 or \
-           self.__readDataIntoBuffer() <= 0 or \
-           not self.__buffer.endsWith(SeparatorToken_b):
+        if (self.bytesAvailable() <= 0 or
+            self.__readDataIntoBuffer() <= 0 or
+                not self.__buffer.endsWith(SeparatorToken_b)):
             return 0
         
         self.__buffer.chop(len(SeparatorToken_b))
@@ -346,8 +346,8 @@
             return False
         
         self.__buffer.clear()
-        self.__numBytesForCurrentDataType = \
-            self.__dataLengthForCurrentDataType()
+        self.__numBytesForCurrentDataType = (
+            self.__dataLengthForCurrentDataType())
         return True
     
     def __hasEnoughData(self):
@@ -361,11 +361,11 @@
             self.__transferTimerId = 0
         
         if self.__numBytesForCurrentDataType <= 0:
-            self.__numBytesForCurrentDataType = \
-                self.__dataLengthForCurrentDataType()
+            self.__numBytesForCurrentDataType = (
+                self.__dataLengthForCurrentDataType())
         
-        if self.bytesAvailable() < self.__numBytesForCurrentDataType or \
-           self.__numBytesForCurrentDataType <= 0:
+        if (self.bytesAvailable() < self.__numBytesForCurrentDataType or
+                self.__numBytesForCurrentDataType <= 0):
             self.__transferTimerId = self.startTimer(TransferTimeout)
             return False
         
@@ -399,8 +399,8 @@
                 participantsList = msg.split(SeparatorToken)
             self.participants.emit(participantsList[:])
         elif self.__currentDataType == Connection.Editor:
-            hashStr, fn, msg = \
-                str(self.__buffer, encoding="utf-8").split(SeparatorToken)
+            hashStr, fn, msg = (
+                str(self.__buffer, encoding="utf-8").split(SeparatorToken))
             self.editorCommand.emit(hashStr, fn, msg)
         
         self.__currentDataType = Connection.Undefined

eric ide

mercurial