Skip to content

Commit

Permalink
fix(utils.py): using str.split instead of shlex.split
Browse files Browse the repository at this point in the history
  • Loading branch information
Taoning Wang committed Aug 25, 2023
1 parent 8963e70 commit 91ce8c3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pyradiance/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from dataclasses import dataclass
import os
from pathlib import Path
import shlex
import subprocess as sp
import sys
from typing import List, Optional, Sequence, Tuple, Union
Expand Down Expand Up @@ -641,11 +640,10 @@ def render(
print("rebuilding octree...")
with open(octpath, "wb") as wtr:
_cmd = radcmds[0].split(">", 1)[0]
print(_cmd.split())
sp.run(_cmd.split(), check=True, stdout=wtr)
_sidx = 1
elif radcmds[0].startswith(("rm", "del")):
sp.run(shlex.split(radcmds[0]), check=True)
sp.run(radcmds[0].split(), check=True)
_sidx = 1
radcmds = [c for c in radcmds[_sidx:] if not c.startswith(("pfilt", "rm"))]
argdict = parse_rtrace_args(" ".join(radcmds))
Expand Down

0 comments on commit 91ce8c3

Please sign in to comment.