From 66fd0bd9439c486ae7b34a8152ca50b04e68267b Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 10 Oct 2021 12:26:14 -0500 Subject: [PATCH] Ignore Errors when reading Files Workaround for german umelts and similar reading utf-8 issues --- yamllint/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yamllint/cli.py b/yamllint/cli.py index cb87350..d608cc0 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -202,7 +202,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, newline='', errors='ignore') as f: problems = linter.run(f, conf, filepath) except EnvironmentError as e: print(e, file=sys.stderr)