Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4031 closed defect (fixed)

mimeview generates errors if SilverCity not installed

Reported by: Daniel Atallah <daniel_atallah@…> Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: version control/browser Version: 0.10
Severity: minor Keywords: highlighter silvercity
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The SilverCity renderer has the highest precedence (3) for most mimetypes by default.

This means that it will be chosen when we want to render something - the problem is that if it isn't present the following gets plopped in the error log:

 <trac.mimeview.silvercity.SilverCityRenderer object at 0x2aaaada96690>
 failed (No module named SilverCity) Traceback (most recent
 +call last):   File "/var/lib/python-
 support/python2.4/trac/mimeview/api.py", line 448, in render     filename,
 url)   File "/var/lib/python-
 support/python2.4/trac/mimeview/silvercity.py",
 +line 93, in render     import SilverCity ImportError: No module named
 SilverCity

It would be nice if the SilverCityRenderer didn't get registered at all if SilverCity isn't present - if that doesn't make sense, perhaps a solution would be to return a quality ratio of 0 if it isn't present and avoid having it included in the candidates.

I had trouble getting this submission through the spam filter.

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 18 years ago

Keywords: highlighter silvercity added
Milestone: 0.11

Should do as in the PygmentsRenderer and introduce a have_silvercity global.

comment:2 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in r4419.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.