From: Philipp Spitzer Date: Sun, 5 Jun 2022 12:35:56 +0000 (+0200) Subject: Avoid seeing differences that do not exist due to special char encoding differences. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/11fd74bd3746b4e1fa88af1d7b2e474f8d6bdaa9 Avoid seeing differences that do not exist due to special char encoding differences. --- diff --git a/bots/sledrun_json_validate.py b/bots/sledrun_json_validate.py index d6472c5..458c89f 100644 --- a/bots/sledrun_json_validate.py +++ b/bots/sledrun_json_validate.py @@ -46,6 +46,7 @@ class SledrunFromJsonBot( if not sledrun_json_page.exists(): return content_json = json.loads(sledrun_json_page.text) + text_orig = json.dumps(content_json, ensure_ascii=False, indent=4) try: validate(instance=content_json, schema=self.sledrun_schema) @@ -57,7 +58,7 @@ class SledrunFromJsonBot( text = str(e) summary = 'JSON Daten aktualisiert.' - self.userPut(sledrun_json_page, sledrun_json_page.text, text, summary=summary, contentmodel='json') + self.userPut(sledrun_json_page, text_orig, text, summary=summary, contentmodel='json') def main(*args: str) -> None: