From 28ea0798124d3bf31f5a898e38e49f0a7f2bc4e6 Mon Sep 17 00:00:00 2001 From: Spencer Phillip Young Date: Tue, 24 Mar 2020 18:53:33 -0700 Subject: [PATCH] Read files in binary mode --- yamllint/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yamllint/cli.py b/yamllint/cli.py index e99fd2c..9490698 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -177,7 +177,7 @@ def run(argv=None): for file in find_files_recursively(args.files, conf): filepath = file[2:] if file.startswith('./') else file try: - with io.open(file, newline='') as f: + with io.open(file, mode='rb') as f: problems = linter.run(f, conf, filepath) except EnvironmentError as e: print(e, file=sys.stderr)