cli: Print EnvironmentErrors on stderr

Errors such as "no such file or directory" should not be printed on
standard output.
This commit is contained in:
Adrien Vergé
2016-03-25 09:50:02 +01:00
parent 20545febe5
commit 0c36d0175c

View File

@@ -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)