From 5c4b11f14311b8034d27dce367cbe3e8dd764baa Mon Sep 17 00:00:00 2001 From: Frank Sachsenheim Date: Tue, 30 Jul 2024 17:28:32 +0200 Subject: [PATCH] fix 4 --- .github/workflows/qa.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index aec4c03..cbc28b2 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -20,7 +20,7 @@ jobs: with: script: | from pathlib import Path - from lxml.etree import parse + from lxml.etree import parse, XMLSyntaxError encountered_errors = [] root_path = Path.cwd() @@ -29,8 +29,7 @@ jobs: try: parse(str(file)) except Exception as e: - message, _ = str(e).rsplit(" (line", maxsplit=1) - encountered_errors.append(f"{file.relative_to(root_path)}: {message}") + encountered_errors.append(f"{file.relative_to(root_path)}: {e.msg}") if encountered_errors: print("\nInvalid XML encodings were found:")