summaryrefslogtreecommitdiff
path: root/Mailman/Logging/Utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Logging/Utils.py')
-rw-r--r--Mailman/Logging/Utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/Logging/Utils.py b/Mailman/Logging/Utils.py
index ad6e652d5..363199974 100644
--- a/Mailman/Logging/Utils.py
+++ b/Mailman/Logging/Utils.py
@@ -38,7 +38,11 @@ def LogStdErr(category, label, manual_reprime=1, tee_to_stdout=1):
manual_reprime=1,
nofail=0)
if tee_to_stdout:
- multi = MultiLogger(sys.__stdout__, sys.stderr)
+ if hasattr(sys, '__stdout__'):
+ stdout = sys.__stdout__
+ else:
+ stdout = sys.stdout
+ multi = MultiLogger(stdout, sys.stderr)
sys.stderr = multi
return sys.stderr
except IOError: