summaryrefslogtreecommitdiff
path: root/paste/util
diff options
context:
space:
mode:
authorianb <devnull@localhost>2008-07-31 18:46:38 +0000
committerianb <devnull@localhost>2008-07-31 18:46:38 +0000
commit349beb2177f91b18faf53b71f2f0d33dd4725ec8 (patch)
tree2294a92ff675ef5d1396601ef4e14261417c62a4 /paste/util
parentf1f5f30462c5d317d3dbd0b01e9f567964c4e986 (diff)
downloadpaste-349beb2177f91b18faf53b71f2f0d33dd4725ec8.tar.gz
Make paste.debug.prints work with appengine, which replaces stdout on every request, so our patching isn't persistent
Diffstat (limited to 'paste/util')
-rw-r--r--paste/util/threadedprint.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paste/util/threadedprint.py b/paste/util/threadedprint.py
index 0d625a6..ae7dc0d 100644
--- a/paste/util/threadedprint.py
+++ b/paste/util/threadedprint.py
@@ -149,7 +149,7 @@ _oldstdout = None
def install(**kw):
global _printcatcher, _oldstdout, register, deregister
- if not _printcatcher:
+ if (not _printcatcher or sys.stdout is not _printcatcher):
_oldstdout = sys.stdout
_printcatcher = sys.stdout = PrintCatcher(**kw)
register = _printcatcher.register