Browse Source

Fix `TypeError` in outfile warning message.

These attributes are strings, not paths. It is safe to format with a
path -- paths are implicitly convertible to strings by formatters. We
use a `PurePath` because we only care about getting the string name and
not actually performing any path manipulation.
pull/348/merge
Adam Johnson 2 years ago
parent
commit
59f660a5f0
  1. 4
      korman/exporter/outfile.py

4
korman/exporter/outfile.py

@ -20,7 +20,7 @@ import json
from .. import korlib from .. import korlib
import locale import locale
import os import os
from pathlib import Path, PureWindowsPath from pathlib import Path, PurePath, PureWindowsPath
from ..plasma_magic import plasma_python_glue from ..plasma_magic import plasma_python_glue
from PyHSPlasma import * from PyHSPlasma import *
import shutil import shutil
@ -392,7 +392,7 @@ class OutputFiles:
shutil.copy2(i.file_path, dst_path) shutil.copy2(i.file_path, dst_path)
else: else:
report.warn("No data found for dependency file '{}'. It will not be copied into the export directory.", report.warn("No data found for dependency file '{}'. It will not be copied into the export directory.",
str(i.dirname / i.filename), indent=1) PurePath(i.dirname, i.filename), indent=1)
def _write_gather_build(self): def _write_gather_build(self):
report = self._exporter().report report = self._exporter().report

Loading…
Cancel
Save