]> git.openstreetmap.org Git - nominatim.git/commitdiff
use string representation when dumping variables
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 20 Jun 2023 08:15:51 +0000 (10:15 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 20 Jun 2023 08:15:51 +0000 (10:15 +0200)
nominatim/api/logging.py

index 6bf3ed38f10230f1b1b3b3a48d4be97e4d3bcd39..a4da357d651bccb358dec2638cbf76b60bcfdbd4 100644 (file)
@@ -196,7 +196,7 @@ class HTMLLogger(BaseLogger):
 
     def _python_var(self, var: Any) -> str:
         if CODE_HIGHLIGHT:
 
     def _python_var(self, var: Any) -> str:
         if CODE_HIGHLIGHT:
-            fmt = highlight(repr(var), PythonLexer(), HtmlFormatter(nowrap=True))
+            fmt = highlight(str(var), PythonLexer(), HtmlFormatter(nowrap=True))
             return f'<div class="highlight"><code class="lang-python">{fmt}</code></div>'
 
         return f'<code class="lang-python">{str(var)}</code>'
             return f'<div class="highlight"><code class="lang-python">{fmt}</code></div>'
 
         return f'<code class="lang-python">{str(var)}</code>'