Mercurial > kallithea
view .coveragerc @ 6949:5395bb85a991
diff: fix crash when displaying diff on a single file
File diff on an image file would fail on
%if op in 'DM':
because op was None:
TypeError: 'in <string>' requires string as left operand, not NoneType
But really, if op is None, we also don't want to show invalid "Show images"
links. Thus, guard the whole image display section with having an actual op.
_parse_gitdiff will never return op None, but wrapped_diff is more lazy and
might do that. It could be considered a bug in wrapped_diff, and this change is
just a bad workaround.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 23 Oct 2017 01:15:06 +0200 |
parents | 0acb46763886 |
children | ddee465a345a |
line wrap: on
line source
[run] omit = # the bin scripts are not part of the Kallithea web app kallithea/bin/* # we ship with no active extensions kallithea/config/rcextensions/* # dbmigrate and paster_commands are not part of the Kallithea web app kallithea/lib/dbmigrate/* kallithea/lib/paster_commands/* # the tests themselves should not be part of the coverage report kallithea/tests/* # the scm hooks are not run in the kallithea process kallithea/config/post_receive_tmpl.py kallithea/config/pre_receive_tmpl.py [paths] source = kallithea/ **/workspace/*/kallithea