Opened 6 years ago

Closed 6 years ago

#3656 closed defect (fixed)

DiscussionPlugin uses 'print' for debugging

Reported by: joshua@… Owned by: Blackhex
Priority: high Component: DiscussionPlugin
Severity: major Keywords: wsgi, sys.stdout
Cc: Trac Release: 0.10


In, 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/", line 406, in dispatch_request
  File "/var/lib/python-support/python2.5/trac/web/", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/tracdiscussion/", line 79, in process_request
    return api.render_discussion(req)
  File "build/bdist.linux-i686/egg/tracdiscussion/", line 69, in render_discussion
    self._do_action(req, modes, group, forum, topic, message, is_moderator)
  File "build/bdist.linux-i686/egg/tracdiscussion/", line 593, in _do_action
  File "build/bdist.linux-i686/egg/tracdiscussion/", line 96, in notify
    NotifyEmail.notify(self, id, subject)
  File "/var/lib/python-support/python2.5/trac/", line 216, in notify
    Notify.notify(self, resid)
  File "/var/lib/python-support/python2.5/trac/", line 115, in notify
    self.send(torcpts, ccrcpts)
  File "build/bdist.linux-i686/egg/tracdiscussion/", line 134, in send
    print torcpts, ccrcpts, header
IOError: sys.stdout access restricted by mod_wsgi

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Blackhex

  • Resolution set to fixed
  • Status changed from new to closed

Ups, fixed with r4234.

Add Comment

Modify Ticket

as closed The owner will remain Blackhex.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.