Skip to content

Commit e643218

Browse files
committed
merge
2 parents add2337 + e594a0d commit e643218

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

neonize/utils/ffmpeg.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,13 @@ async def cv_to_webp(self, animated: bool = True) -> bytes:
260260
return buf
261261

262262
async def call(self, cmd: List[str]):
263-
if any(" " in part for part in cmd):
264-
cmd_str = shlex.join(cmd)
265-
else:
266-
cmd_str = " ".join(cmd)
263+
cmd_str = shlex.join(cmd) if any(" " in part for part in cmd) else " ".join(cmd)
267264
popen = await asyncio.create_subprocess_shell(
268-
cmd_str,
265+
cmd_str if os.name == "nt" else shlex.join(cmd) ,
269266
stderr=asyncio.subprocess.PIPE,
270267
stdout=asyncio.subprocess.PIPE,
271268
stdin=subprocess.DEVNULL,
272-
shell=True if os.name == "nt" else False,
269+
# shell=True if os.name == "nt" else False,
273270
)
274271
stdout, stderr = await popen.communicate() # type: ignore
275272
if popen.returncode != 0:

0 commit comments

Comments
 (0)