Beremiz_service.py
changeset 3843 832bcf1b5b60
parent 3803 b3394107eb8b
child 3884 34da877021d5
--- a/Beremiz_service.py	Mon Aug 07 18:17:12 2023 +0200
+++ b/Beremiz_service.py	Thu Sep 28 17:56:03 2023 +0200
@@ -558,8 +558,9 @@
 
     # Beremiz IDE detects LOCAL:// runtime is ready by looking
     # for self.workdir in the daemon's stdout.
-    sys.stdout.write(_("Current working directory :") + WorkingDir + "\n")
-    sys.stdout.flush()
+    if sys.stdout:
+        sys.stdout.write(_("Current working directory :") + WorkingDir + "\n")
+        sys.stdout.flush()
 
     runtime.GetPLCObjectSingleton().AutoLoad(autostart)