Modify

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

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 (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

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


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

 
Note: See TracTickets for help on using tickets.