src/eric7/EricNetwork/EricJsonStreamWriter.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/EricNetwork/EricJsonStreamWriter.py
--- a/src/eric7/EricNetwork/EricJsonStreamWriter.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/EricNetwork/EricJsonStreamWriter.py	Wed Jul 13 14:55:47 2022 +0200
@@ -15,27 +15,28 @@
     """
     Class implementing a JSON based writer class.
     """
+
     def __init__(self, host, port):
         """
         Constructor
-        
+
         @param host IP address the reader is listening on
         @type str
         @param port port the reader is listening on
         @type int
         """
         self.__connection = socket.create_connection((host, port))
-    
+
     def write(self, data):
         """
         Public method to send JSON serializable data.
-        
+
         @param data JSON serializable object to be sent
         @type object
         """
-        dataStr = json.dumps(data) + '\n'
-        self.__connection.sendall(dataStr.encode('utf8', 'backslashreplace'))
-    
+        dataStr = json.dumps(data) + "\n"
+        self.__connection.sendall(dataStr.encode("utf8", "backslashreplace"))
+
     def close(self):
         """
         Public method to close the stream.

eric ide

mercurial