diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:54:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:54:09 +0000 |
commit | b12aca2eea3676bb3cf2666b63542c019fac699d (patch) | |
tree | 026eec6b22f4422a90479fea630e8e173781aa79 /yt_dlp/compat | |
parent | Adding debian version 2024.03.10-1. (diff) | |
download | yt-dlp-b12aca2eea3676bb3cf2666b63542c019fac699d.tar.xz yt-dlp-b12aca2eea3676bb3cf2666b63542c019fac699d.zip |
Merging upstream version 2024.04.09.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/compat')
-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): |