From b8e259add3d596036a6365343c7d680a5b0b8040 Mon Sep 17 00:00:00 2001 From: Oliver Bristow Date: Sat, 4 Aug 2018 22:08:23 +0100 Subject: [PATCH] Make missing lexer error less verbose --- colout/colout.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/colout/colout.py b/colout/colout.py index 6b5d619..3cfaa61 100755 --- a/colout/colout.py +++ b/colout/colout.py @@ -1050,10 +1050,7 @@ def main(): elif as_source: logging.debug("asked for lexer: %s" % pattern.lower()) if pattern.lower() not in context["lexers"]: - logging.error("Lexer %r is not one of %s" % ( - pattern, - ", ".join(repr(lexer) for lexer in context["lexers"]), - )) + logging.error("Lexer %r is not available. Run with \"--resources all\" to see the options.") sys.exit(error_codes["UnknownLexer"]) lexer = get_lexer_by_name(pattern.lower()) # Python => 256 colors, python => 8 colors