Skip to content

Commit f961b9d

Browse files
committed
Last piece for issue #175
1 parent 431b612 commit f961b9d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

addons/source-python/packages/source-python/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,15 @@ def flush(self):
485485
if sys.stderr is None:
486486
sys.stderr = OutputRedirect()
487487

488+
from engines.server import engine_server
489+
490+
if not engine_server.is_dedicated_server():
491+
# Return here for listen servers, because we only want to see the
492+
# warning if reconnecting the output streams failed, which is only
493+
# done on dedicated servers. For listen servers creating OutputRedirect
494+
# instances is the proper fix.
495+
return
496+
488497
from warnings import warn
489498
warn(
490499
'sys.stdout and/or sys.stderr is None. All data will be redirected through '

0 commit comments

Comments
 (0)