Edgewall Software

Opened 9 years ago

Last modified 9 years ago

#12151 closed defect

AttributeError is raiesd by hdfdump=1 parameter — at Initial Version

Reported by: Jun Omae Owned by:
Priority: normal Milestone: 1.0.9
Component: rendering Version: 1.0.8
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This issue is introduced in [14186] (#12131).

2015-08-05 16:59:05,888 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/venv/trac/1.0.8/lib/python2.5/site-packages/trac/web/main.py", line 551, in _dispatch_request
    dispatcher.dispatch(req)
  File "/venv/trac/1.0.8/lib/python2.5/site-packages/trac/web/main.py", line 258, in dispatch
    out = StringIO.StringIO()
AttributeError: class StringIO has no attribute 'StringIO'
  • trac/web/main.py

    diff --git a/trac/web/main.py b/trac/web/main.py
    index 909d75ec0..e01f91083 100644
    a b import pkg_resources  
    2727from pprint import pformat, pprint
    2828import re
    2929import sys
    30 import StringIO
    3130
    3231from genshi.builder import tag
    3332from genshi.output import DocType
    class RequestDispatcher(Component):  
    255254                    if 'hdfdump' in req.args:
    256255                        req.perm.require('TRAC_ADMIN')
    257256                        # debugging helper - no need to render first
    258                         out = StringIO.StringIO()
     257                        out = StringIO()
    259258                        pprint(data, out)
    260259                        req.send(out.getvalue(), 'text/plain')
    261260

Change History (0)

Note: See TracTickets for help on using tickets.