src/eric7/Utilities/BackgroundService.py

branch
eric7
changeset 11255
1c2bd52f2002
parent 11215
d07c71a34adf
diff -r cdb56075b4bc -r 1c2bd52f2002 src/eric7/Utilities/BackgroundService.py
--- a/src/eric7/Utilities/BackgroundService.py	Fri May 02 16:18:18 2025 +0200
+++ b/src/eric7/Utilities/BackgroundService.py	Fri May 02 16:19:35 2025 +0200
@@ -40,12 +40,14 @@
     serviceNotAvailable = pyqtSignal(str, str, str, str)
     batchJobDone = pyqtSignal(str, str)
 
-    def __init__(self, parent=None):
+    def __init__(self, releaseMode=False, parent=None):
         """
         Constructor
 
-        @param parent reference to the parent object
-        @type QObject
+        @param releaseMode flag indicating release mode operations (defaults to False)
+        @type bool (optional)
+        @param parent reference to the parent object (defaults to None)
+        @type QObject (optional)
         """
         super().__init__(parent)
 
@@ -70,15 +72,16 @@
         self.newConnection.connect(self.on_newConnection)
         parent.shutdown.connect(self.__shutdown)
 
-        ## Note: Need the address and port if started external in debugger:
         port = self.serverPort()
-        hostAddressStr = (
-            "[{0}]".format(self.__hostAddress)
-            if ":" in self.__hostAddress
-            else self.__hostAddress
-        )
-        print("Background Service listening on: {0}:{1:d}".format(hostAddressStr, port))
-        # __IGNORE_WARNING_M-801__
+        if not releaseMode:
+            ## Note: Need the address and port if started external in debugger:
+            hostAddressStr = (
+                "[{0}]".format(self.__hostAddress)
+                if ":" in self.__hostAddress
+                else self.__hostAddress
+            )
+            print(f"Background Service listening on: {hostAddressStr}:{port:d}")
+            # __IGNORE_WARNING_M-801__
 
         interpreter = self.__getPythonInterpreter()
         if interpreter:

eric ide

mercurial