Browse Source

Turn an error into a warning

pull/176/head
Louis 9 years ago
parent
commit
e1ab8daa7f
  1. 15
      patacrep/content/song.py

15
patacrep/content/song.py

@ -90,13 +90,14 @@ def parse(keyword, argument, contentlist, config):
LOGGER.debug('Parsing file "{}"'.format(filename)) LOGGER.debug('Parsing file "{}"'.format(filename))
extension = filename.split(".")[-1] extension = filename.split(".")[-1]
if extension not in plugins: if extension not in plugins:
songlist.append_error(ContentError(message=( LOGGER.info(
'I do not know how to parse "{}": name does ' (
'not end with one of {}. Ignored.' 'I do not know how to parse "%s": name does '
).format( 'not end with one of %s. Ignored.'
os.path.join(songdir.datadir, filename), ),
", ".join(["'.{}'".format(key) for key in plugins.keys()]), os.path.join(songdir.datadir, filename),
))) ", ".join(["'.{}'".format(key) for key in plugins.keys()])
)
continue continue
try: try:
renderer = SongRenderer(plugins[extension]( renderer = SongRenderer(plugins[extension](

Loading…
Cancel
Save