X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a413aae8a3962be4d623844d867604df68a9a211..7d911f9ffbdf63b2b2a45c3a3ee7063d006a5779:/nominatim/api/logging.py?ds=sidebyside diff --git a/nominatim/api/logging.py b/nominatim/api/logging.py index 6bf3ed38..6c8b1b38 100644 --- a/nominatim/api/logging.py +++ b/nominatim/api/logging.py @@ -178,7 +178,7 @@ class HTMLLogger(BaseLogger): self._write(f"rank={res.rank_address}, ") self._write(f"osm={format_osm(res.osm_object)}, ") self._write(f'cc={res.country_code}, ') - self._write(f'importance={res.importance or -1:.5f})') + self._write(f'importance={res.importance or float("nan"):.5f})') total += 1 self._write(f'TOTAL: {total}
') @@ -196,7 +196,7 @@ class HTMLLogger(BaseLogger): 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'{fmt}
{str(var)}
'