Mercurial > kallithea
changeset 8385:4c7eca54cd55 stable
issue: log more helpful errors for "skipping incomplete issue pattern"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 02 May 2020 23:15:19 +0200 |
parents | b77c22e8a39c |
children | a67945aec3df 2dc4a2116927 |
files | kallithea/lib/helpers.py |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/helpers.py Sat May 02 23:02:02 2020 +0200 +++ b/kallithea/lib/helpers.py Sat May 02 23:15:19 2020 +0200 @@ -1194,8 +1194,14 @@ issue_prefix = CONFIG.get('issue_prefix%s' % suffix) if issue_prefix: log.error('found unsupported issue_prefix%s = %r - use issue_sub%s instead', suffix, issue_prefix, suffix) - if not issue_pat or not issue_server_link or issue_sub is None: # issue_sub can be empty but should be present - log.error('skipping incomplete issue pattern %r: %r -> %r %r', k, issue_pat, issue_server_link, issue_sub) + if not issue_pat: + log.error('skipping incomplete issue pattern %r: it needs a regexp', k) + continue + if not issue_server_link: + log.error('skipping incomplete issue pattern %r: it needs issue_server_link%s', k, suffix) + continue + if issue_sub is None: # issue_sub can be empty but should be present + log.error('skipping incomplete issue pattern %r: it needs (a potentially empty) issue_sub%s', k, suffix) continue # Wrap tmp_urlify_issues_f with substitution of this pattern, while making sure all loop variables (and compiled regexpes) are bound