Modified the latest change slightly to do the redirection only if stdout/stderr are None or it an official release. eric7

Tue, 02 Jul 2024 17:59:11 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 02 Jul 2024 17:59:11 +0200
branch
eric7
changeset 10813
77d4d1878228
parent 10812
f62e1bf47492
child 10814
ba20efe10336
child 10816
236d97cba7c5

Modified the latest change slightly to do the redirection only if stdout/stderr are None or it an official release.

src/eric7/UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/src/eric7/UI/UserInterface.py	Tue Jul 02 14:45:15 2024 +0200
+++ b/src/eric7/UI/UserInterface.py	Tue Jul 02 17:59:11 2024 +0200
@@ -238,6 +238,9 @@
     maxFilePathLen = 100
     maxMenuFilePathLen = 75
 
+    # TODO: change this to 'True' for official releases
+    ReleaseMode = False
+
     ErrorLogFileName = "eric7_error.log"
 
     def __init__(
@@ -343,9 +346,9 @@
         self.stderr = Redirector(True, self)
         self.stderr.appendStderr.connect(self.appendToStderr)
         # Redirect sys.stdout and/or sys.stderr if those are None
-        if sys.stdout is None:
+        if sys.stdout is None or UserInterface.ReleaseMode:
             sys.stdout = self.stdout
-        if sys.stderr is None:
+        if sys.stderr is None or UserInterface.ReleaseMode:
             sys.stderr = self.stderr
 
         # create the remote server interface

eric ide

mercurial