eric6/Utilities/BackgroundClient.py

branch
multi_processing
changeset 7564
787684e6f2f3
parent 7421
4a9900aef04e
parent 7534
5441fa55cb0d
child 7646
39e3db2b4936
--- a/eric6/Utilities/BackgroundClient.py	Sat May 02 14:35:03 2020 +0200
+++ b/eric6/Utilities/BackgroundClient.py	Sat May 02 14:45:06 2020 +0200
@@ -80,6 +80,12 @@
         @param fn filename for identification (str)
         @param data return value(s) (any basic datatype)
         """
+        if not isinstance(data, (
+            dict, list, tuple, str, int, float, bool, type(None),
+        )):
+            # handle sending of objects of unsupported types
+            data = str(data)
+        
         packedData = json.dumps([fx, fn, data])
         if sys.version_info[0] >= 3:
             packedData = bytes(packedData, 'utf-8')

eric ide

mercurial