Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#6944 closed defect (fixed)

unicode decode error on `WebAdmin - Plugins` page

Reported by: trac-ja@… Owned by: osimons
Priority: normal Milestone: 0.11
Component: admin/web Version: devel
Severity: normal Keywords:
Cc: trac-ja@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

looks like #6890. WebAdmin - plugins page fails, if plugines's docstring has non-ASCII chars.

Patch:

  • trac/admin/web_ui.py

     
    3030from trac.perm import PermissionSystem, IPermissionRequestor
    3131from trac.util import get_pkginfo, get_module_path
    3232from trac.util.compat import partial
     33from trac.util.text import to_unicode
    3334from trac.util.translation import _
    3435from trac.web import HTTPNotFound, IRequestHandler
    3536from trac.web.chrome import add_script, add_stylesheet, add_warning, Chrome, \
     
    480481            if os.path.realpath(os.path.dirname(dist.location)) == plugins_dir:
    481482                plugin_filename = os.path.basename(dist.location)
    482483
    483             description = inspect.getdoc(component)
     484            description = to_unicode(inspect.getdoc(component))
    484485            if description:
    485486                description = description.split('.', 1)[0] + '.'
    486487

Attachments (0)

Change History (2)

comment:1 by osimons, 17 years ago

Owner: changed from Christopher Lenz to osimons

Ideally plugins should provide unicode strings if they have non-ascii characters in any strings.

However, better safe than sorry, I suppose - certainly for such a minor fix.

I'll get onto it.

comment:2 by osimons, 17 years ago

Resolution: fixed
Status: newclosed

Thanks for the patch - tested and committed in [6667].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from osimons to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.