From 0c36d0175c97495eacb3c3a829d0fff92accb64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Fri, 25 Mar 2016 09:50:02 +0100 Subject: [PATCH] cli: Print EnvironmentErrors on stderr Errors such as "no such file or directory" should not be printed on standard output. --- yamllint/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yamllint/cli.py b/yamllint/cli.py index 8c13678..3b67011 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -123,7 +123,7 @@ def run(argv=None): if not first and args.format != 'parsable': print('') except EnvironmentError as e: - print(e) + print(e, file=sys.stderr) return_code = -1 sys.exit(return_code)