Skip to content

Commit

Permalink
Fix stream handling
Browse files Browse the repository at this point in the history
  • Loading branch information
thesadru committed Nov 6, 2023
1 parent 6eeff5d commit ccd0d93
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arkprts/assets/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def run_flatbuffers(
output_directory: PathLike,
) -> pathlib.Path:
"""Run the flatbuffers cli. Returns the output filename."""
stderr = io.StringIO()
code = subprocess.call(
[ # noqa: S603 # check for execution of untrusted input
"flatc",
Expand All @@ -105,10 +104,9 @@ def run_flatbuffers(
# "--no-warnings",
"--force-empty",
],
stderr=stderr,
stderr=subprocess.DEVNULL,
)
if code != 0:
LOGGER.error(stderr.read())
raise ValueError(f"flatc failed with code {code}")

return pathlib.Path(output_directory) / (pathlib.Path(fbs_path).stem + ".json")
Expand Down

0 comments on commit ccd0d93

Please sign in to comment.