Modify

Opened 16 years ago

Closed 16 years ago

#3656 closed defect (fixed)

DiscussionPlugin uses 'print' for debugging

Reported by: joshua@… Owned by: Radek Bartoň
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 16 years ago by Radek Bartoň

Resolution: fixed
Status: newclosed

Ups, fixed with r4234.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.