On 09/28/2015 02:25 PM, Robert Rauch wrote:
Hi all,
I have recently started using a custom rcextensions package for
improving our integration of Kallithea with other services like Jenkins
and Redmine.
Today I noticed, that our Kallithea produced 'internal server errors'
when viewing the sourcecode of revisioned files via the webfrontend. The
logfiles showed, that Kallithea was raising exceptions of type
AttributeError: 'module' object has no attribute 'EXTRA_LEXERS'
I worked around this problem by providing the *missing* line
EXTRA_LEXERS = {}
in my custom rcextensions/__init__.py.
Is this the intended behaviour of Kallithea?
I don't know. As far as I can see it is in the
kallithea/config/rcextensions/__init__.py "template".
From my perspective, as a
user/admin, this is really annoying. Why doesn't Kallithea fall back to
its default of `EXTRA_LEXERS = {}` if it is not defined elsewhere?
That would probably make sense. It would probably be a question of
adding some hasattr checks or replacing some .X with getattr('X',
default) or replacing some ['X'] with .get('X', default) .
Can you contribute a patch?
(We should generally replace hasattr with something like safehasattr as
Mercurial use ... but that is a different story.)
Besides that, I think the rcextensions API needs more documentation.
Indeed. We appreciate the documentation you already contributed ;-)
/Mads
_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general