eric6/Utilities/BackgroundService.py

changeset 8264
f95dde35d0ab
parent 8243
cc717c2ae956
child 8273
698ae46f40a4
child 8307
01a323d3d4d7
--- a/eric6/Utilities/BackgroundService.py	Mon Apr 26 17:19:39 2021 +0200
+++ b/eric6/Utilities/BackgroundService.py	Mon Apr 26 17:33:08 2021 +0200
@@ -184,7 +184,15 @@
             fx, fn, data = json.loads(packedData)
             
             if fx == 'INIT':
-                pass
+                if data != "ok":
+                    E5MessageBox.critical(
+                        None,
+                        self.tr("Initialization of Background Service"),
+                        self.tr(
+                            "<p>Initialization of Background Service"
+                            " <b>{0}</b> failed.</p><p>Reason: {1}</p>")
+                        .format(fn, data)
+                    )
             elif fx == 'EXCEPTION':
                 # Remove connection because it'll close anyway
                 self.connections.pop(lang, None)
@@ -238,7 +246,9 @@
                             callback[2](fn, *data)
                         elif isinstance(data, str):
                             callback[3](fx, lang, fn, data)
-                    continue
+                    if data == 'Unknown batch service.':
+                        self.batchJobDone.emit(fx, lang)
+                        self.__cancelled = True
                 else:
                     self.batchJobDone.emit(fx, lang)
             else:

eric ide

mercurial