From a1b9f949ec407aa75161e0580d9852d8ae341eb7 Mon Sep 17 00:00:00 2001 From: Miro <200482516+Mirochill@users.noreply.github.com> Date: Sat, 23 May 2026 20:23:17 +0200 Subject: [PATCH] BUG: replace removed pipes.quote usage --- ffprobe/ffprobe.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ffprobe/ffprobe.py b/ffprobe/ffprobe.py index f1eb3dc..ad88fbf 100644 --- a/ffprobe/ffprobe.py +++ b/ffprobe/ffprobe.py @@ -4,11 +4,15 @@ import functools import operator import os -import pipes import platform import re import subprocess +try: + from shlex import quote as shell_quote +except ImportError: + from pipes import quote as shell_quote + from ffprobe.exceptions import FFProbeError @@ -31,7 +35,7 @@ def __init__(self, path_to_video): if platform.system() == 'Windows': cmd = ["ffprobe", "-show_streams", self.path_to_video] else: - cmd = ["ffprobe -show_streams " + pipes.quote(self.path_to_video)] + cmd = ["ffprobe -show_streams " + shell_quote(self.path_to_video)] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)