Opened 18 years ago
Closed 18 years ago
#4031 closed defect (fixed)
mimeview generates errors if SilverCity not installed
Reported by: | 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 , 18 years ago
Keywords: | highlighter silvercity added |
---|---|
Milestone: | → 0.11 |
Should do as in the PygmentsRenderer and introduce a
have_silvercity
global.