diff --git a/patacrep/latex/__init__.py b/patacrep/latex/__init__.py index 5ea81a67..83d12906 100644 --- a/patacrep/latex/__init__.py +++ b/patacrep/latex/__init__.py @@ -130,5 +130,5 @@ def lang2babel(lang): try: return BABEL_LANGUAGES[checklanguage(lang)] except UnknownLanguage as error: - LOGGER.error(str(error)) + LOGGER.warning(str(error)) return BABEL_LANGUAGES[error.fallback] diff --git a/patacrep/latex/lexer.py b/patacrep/latex/lexer.py index f76500f8..0e60e826 100644 --- a/patacrep/latex/lexer.py +++ b/patacrep/latex/lexer.py @@ -72,7 +72,7 @@ class SimpleLexer: @staticmethod def t_error(token): """Manage errors""" - LOGGER.error("Illegal character '{}'".format(token.value[0])) + LOGGER.warning("Illegal character '{}'".format(token.value[0])) token.lexer.skip(1) class SongLexer(SimpleLexer): diff --git a/patacrep/songs/chordpro/lexer.py b/patacrep/songs/chordpro/lexer.py index 16f494b3..ab8d4de6 100644 --- a/patacrep/songs/chordpro/lexer.py +++ b/patacrep/songs/chordpro/lexer.py @@ -142,7 +142,7 @@ class ChordProLexer: ) if self.filename is not None: message = "File {}: {}".format(self.filename, message) - LOGGER.error(message) + LOGGER.warning(message) token.lexer.skip(1) def t_error(self, token): diff --git a/patacrep/songs/syntax.py b/patacrep/songs/syntax.py index d3b5c0ac..0ea5208b 100644 --- a/patacrep/songs/syntax.py +++ b/patacrep/songs/syntax.py @@ -45,9 +45,9 @@ class Parser: else: text += "." if self.filename is None: - LOGGER.error(text) + LOGGER.warning(text) else: - LOGGER.error("File {}: {}".format(self.filename, text)) + LOGGER.warning("File {}: {}".format(self.filename, text)) def p_error(self, token): """Manage parsing errors."""