Commits

Anonymous committed 5900c11

Avoid a weird upstream traceback in certain failure situations

  • Participants
  • Parent commits cb6b1e7

Comments (0)

Files changed (1)

paste/debug/prints.py

         if self.print_wsgi_errors:
             listeners.append(environ['wsgi.errors'])
         replacement_stdout = TeeFile(listeners)
+        threadedprint.register(replacement_stdout)
         try:
-            threadedprint.register(replacement_stdout)
             status, headers, body = wsgilib.intercept_output(
                 environ, self.app)
             if status is None: