Ticket #3656 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

DiscussionPlugin uses 'print' for debugging

Reported by: joshua@ska-corp.com Assigned to: Blackhex
Priority: high Component: DiscussionPlugin
Severity: major Keywords: wsgi, sys.stdout
Cc: Trac Release: 0.10

Description

In notification.py, DiscussionPlugin uses a print for outputting some debugging information. This causes the WSGI handler to throw an exception because writing to sys.stdout is not allowed when running under WSGI.

Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 79, in process_request
    return api.render_discussion(req)
  File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 69, in render_discussion
    self._do_action(req, modes, group, forum, topic, message, is_moderator)
  File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 593, in _do_action
    cc)
  File "build/bdist.linux-i686/egg/tracdiscussion/notification.py", line 96, in notify
    NotifyEmail.notify(self, id, subject)
  File "/var/lib/python-support/python2.5/trac/notification.py", line 216, in notify
    Notify.notify(self, resid)
  File "/var/lib/python-support/python2.5/trac/notification.py", line 115, in notify
    self.send(torcpts, ccrcpts)
  File "build/bdist.linux-i686/egg/tracdiscussion/notification.py", line 134, in send
    print torcpts, ccrcpts, header
IOError: sys.stdout access restricted by mod_wsgi

Attachments

Change History

09/03/08 17:51:42 changed by Blackhex

  • status changed from new to closed.
  • resolution set to fixed.

Ups, fixed with r4234.


Add/Change #3656 (DiscussionPlugin uses 'print' for debugging)




Change Properties
Action