eric6/Utilities/BackgroundClient.py

changeset 7534
5441fa55cb0d
parent 7360
9190402e4505
child 7564
787684e6f2f3
child 7628
f904d0eef264
diff -r 88261c96484b -r 5441fa55cb0d eric6/Utilities/BackgroundClient.py
--- a/eric6/Utilities/BackgroundClient.py	Sun Apr 12 19:07:49 2020 +0200
+++ b/eric6/Utilities/BackgroundClient.py	Mon Apr 13 11:30:24 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