diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:54:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:54:10 +0000 |
commit | 51b156e61c2761f69bb4ca39e115077705083406 (patch) | |
tree | 25bcc4265216ca429a2275c577fc631098a181c0 /yt_dlp/compat/__init__.py | |
parent | Releasing progress-linux version 2024.03.10-1~progress7.99u1. (diff) | |
download | yt-dlp-51b156e61c2761f69bb4ca39e115077705083406.tar.xz yt-dlp-51b156e61c2761f69bb4ca39e115077705083406.zip |
Merging upstream version 2024.04.09.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/compat/__init__.py')
-rw-r--r-- | yt_dlp/compat/__init__.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/yt_dlp/compat/__init__.py b/yt_dlp/compat/__init__.py index 5ad5c70..d820ada 100644 --- a/yt_dlp/compat/__init__.py +++ b/yt_dlp/compat/__init__.py @@ -27,12 +27,9 @@ def compat_etree_fromstring(text): compat_os_name = os._name if os.name == 'java' else os.name -if compat_os_name == 'nt': - def compat_shlex_quote(s): - import re - return s if re.match(r'^[-_\w./]+$', s) else s.replace('"', '""').join('""') -else: - from shlex import quote as compat_shlex_quote # noqa: F401 +def compat_shlex_quote(s): + from ..utils import shell_quote + return shell_quote(s) def compat_ord(c): |