Skip to content

Commit

Permalink
Merge pull request #18 from LBNL-ETA/develop
Browse files Browse the repository at this point in the history
refactor(ot.py): oconv move stdin after the paths
  • Loading branch information
taoning committed Jul 26, 2023
2 parents b9f4d29 + 6ac0577 commit 53eb437
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyradiance/ot.py
Expand Up @@ -47,10 +47,10 @@ def oconv(*paths, warning=True, stdin=None, frozen: bool = False, octree=None) -
cmd.append("-w")
if frozen:
cmd.append("-f")
cmd.extend(paths)
if stdin:
if isinstance(stdin, bytes):
cmd.append("-")
else:
raise TypeError("stdin should be bytes.")
cmd.extend(paths)
return sp.run(cmd, input=stdin, stdout=sp.PIPE, check=True).stdout

0 comments on commit 53eb437

Please sign in to comment.