Browse Source

Résolution d'un bug si la variable `titleprefixwords` n'est pas définie dans les templates

pull/32/head
Louis 11 years ago
parent
commit
550b809a27
  1. 3
      songbook_core/build.py

3
songbook_core/build.py

@ -70,7 +70,10 @@ class Songbook(object):
- config : a dictionary containing the configuration - config : a dictionary containing the configuration
""" """
Song.sort = config['sort'] Song.sort = config['sort']
if 'titleprefixwords' in config:
Song.prefixes = config['titleprefixwords'] Song.prefixes = config['titleprefixwords']
else:
Song.prefixes = []
Song.authwords['after'] = [ Song.authwords['after'] = [
re.compile(r"^.*%s\b(.*)" % after) re.compile(r"^.*%s\b(.*)" % after)
for after for after

Loading…
Cancel
Save