From 349beb2177f91b18faf53b71f2f0d33dd4725ec8 Mon Sep 17 00:00:00 2001 From: ianb Date: Thu, 31 Jul 2008 18:46:38 +0000 Subject: Make paste.debug.prints work with appengine, which replaces stdout on every request, so our patching isn't persistent --- paste/util/threadedprint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'paste/util') 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 -- cgit v1.2.1