in ptr.py [0:0]
def _write_stats_file(stats_file: str, stats: Dict[str, int]) -> None:
stats_file_path = Path(stats_file)
if not stats_file_path.is_absolute():
stats_file_path = Path(CWD) / stats_file_path
try:
with stats_file_path.open("w", encoding="utf8") as sfp:
dump(stats, sfp, indent=2, sort_keys=True)
except OSError as ose:
LOG.exception(
f"Unable to write out JSON statistics file to {stats_file} ({ose})"
)