Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton-byte committed Dec 4, 2024
2 parents add2337 + e594a0d commit e643218
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions neonize/utils/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,13 @@ async def cv_to_webp(self, animated: bool = True) -> bytes:
return buf

async def call(self, cmd: List[str]):
if any(" " in part for part in cmd):
cmd_str = shlex.join(cmd)
else:
cmd_str = " ".join(cmd)
cmd_str = shlex.join(cmd) if any(" " in part for part in cmd) else " ".join(cmd)
popen = await asyncio.create_subprocess_shell(
cmd_str,
cmd_str if os.name == "nt" else shlex.join(cmd) ,
stderr=asyncio.subprocess.PIPE,
stdout=asyncio.subprocess.PIPE,
stdin=subprocess.DEVNULL,
shell=True if os.name == "nt" else False,
# shell=True if os.name == "nt" else False,
)
stdout, stderr = await popen.communicate() # type: ignore
if popen.returncode != 0:
Expand Down

0 comments on commit e643218

Please sign in to comment.