]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Avoid seeing differences that do not exist due to special char encoding differences.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 5 Jun 2022 12:35:56 +0000 (14:35 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 5 Jun 2022 12:35:56 +0000 (14:35 +0200)
bots/sledrun_json_validate.py

index d6472c5ba00e978f63fcc3170d5b07d97755cb28..458c89f2ac477df9d3f2a9cfa899d8764c35e896 100644 (file)
@@ -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: